Fixed code formatting
diff --git a/views/ngXosLib/xosHelpers/spec/services/helpers/form.helpers.test.js b/views/ngXosLib/xosHelpers/spec/services/helpers/form.helpers.test.js
index 29d812d..21e2649 100644
--- a/views/ngXosLib/xosHelpers/spec/services/helpers/form.helpers.test.js
+++ b/views/ngXosLib/xosHelpers/spec/services/helpers/form.helpers.test.js
@@ -186,11 +186,13 @@
type: 'number',
hint: 'Test Hint'
},
- select:{
+ select: {
label: 'Select Label',
type: 'select',
hint: 'Select Hint',
- options:{}
+ options: [
+ {id: 1, label: 'something'}
+ ]
}
};
@@ -231,12 +233,14 @@
validators: {},
hint: 'Test Hint'
},
- select:{
+ select: {
label: 'Select Label:',
type: 'select',
hint: 'Select Hint',
validators: {},
- options:{}
+ options: [
+ {id: 1, label: 'something'}
+ ]
}
};
diff --git a/views/ngXosLib/xosHelpers/spec/ui/field.test.js b/views/ngXosLib/xosHelpers/spec/ui/field.test.js
index e985cd6..b946f93 100644
--- a/views/ngXosLib/xosHelpers/spec/ui/field.test.js
+++ b/views/ngXosLib/xosHelpers/spec/ui/field.test.js
@@ -103,13 +103,16 @@
label: 'Label',
type: 'select',
validators: {},
- options:[{
- id:0,
- label:"---Site---"
- },{
- id:1,
- label:"---Site1---"
- }]
+ options: [
+ {
+ id: 0,
+ label: '---Site---'
+ },
+ {
+ id: 1,
+ label: '---Site1---'
+ }
+ ]
};
scope.ngModel = 'label';
compileElement();
diff --git a/views/ngXosLib/xosHelpers/spec/ui/form.test.js b/views/ngXosLib/xosHelpers/spec/ui/form.test.js
index cb9f9e8..eac10f5 100644
--- a/views/ngXosLib/xosHelpers/spec/ui/form.test.js
+++ b/views/ngXosLib/xosHelpers/spec/ui/form.test.js
@@ -33,21 +33,21 @@
compile = $compile;
}));
- it('should throw an error if no config is specified', inject(($compile, $rootScope) => {
+ it('should throw an error if no config is specified', () => {
function errorFunctionWrapper(){
compileElement();
}
expect(errorFunctionWrapper).toThrow(new Error('[xosForm] Please provide a configuration via the "config" attribute'));
- }));
+ });
- it('should throw an error if no actions is specified', inject(($compile, $rootScope) => {
+ it('should throw an error if no actions is specified', () => {
function errorFunctionWrapper(){
- scope = $rootScope.$new();
+ scope = rootScope.$new();
scope.config = 'green';
compileElement();
}
expect(errorFunctionWrapper).toThrow(new Error('[xosForm] Please provide an action list in the configuration'));
- }));
+ });
describe('when correctly configured', () => {
diff --git a/views/ngXosLib/xosHelpers/spec/ui/table.test.js b/views/ngXosLib/xosHelpers/spec/ui/table.test.js
index e94eb36..1535c6e 100644
--- a/views/ngXosLib/xosHelpers/spec/ui/table.test.js
+++ b/views/ngXosLib/xosHelpers/spec/ui/table.test.js
@@ -31,22 +31,22 @@
rootScope = $rootScope;
}));
- it('should throw an error if no config is specified', inject(($compile, $rootScope) => {
+ it('should throw an error if no config is specified', () => {
function errorFunctionWrapper(){
compileElement();
}
expect(errorFunctionWrapper).toThrow(new Error('[xosTable] Please provide a configuration via the "config" attribute'));
- }));
+ });
- it('should throw an error if no config columns are specified', inject(($compile, $rootScope) => {
+ it('should throw an error if no config columns are specified', () => {
function errorFunctionWrapper(){
// setup the parent scope
- scope = $rootScope.$new();
+ scope = rootScope.$new();
scope.config = 'green';
compileElement();
}
expect(errorFunctionWrapper).toThrow(new Error('[xosTable] Please provide a columns list in the configuration'));
- }));
+ });
describe('when basicly configured', function() {
diff --git a/views/ngXosLib/xosHelpers/spec/ui/validation.test.js b/views/ngXosLib/xosHelpers/spec/ui/validation.test.js
index bb663fa..f8350ed 100644
--- a/views/ngXosLib/xosHelpers/spec/ui/validation.test.js
+++ b/views/ngXosLib/xosHelpers/spec/ui/validation.test.js
@@ -7,7 +7,7 @@
(function () {
'use strict';
- let compile, element, scope, isolatedScope;
+ let compile, element, scope;
const compileElement = (el) => {
element = el;
@@ -20,7 +20,6 @@
}
compile(element)(scope);
scope.$digest();
- isolatedScope = element.isolateScope().vm;
}
describe('The xos.helper module', function(){