mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 06:38:17 +00:00
[Code Style] Run gulp fixstyle
...to apply code style settings from #142.
This commit is contained in:
@ -26,13 +26,13 @@ define(
|
||||
],
|
||||
function (TableOptionsController) {
|
||||
|
||||
describe('The Table Options Controller', function() {
|
||||
describe('The Table Options Controller', function () {
|
||||
var mockDomainObject,
|
||||
mockCapability,
|
||||
controller,
|
||||
mockScope;
|
||||
|
||||
beforeEach(function() {
|
||||
beforeEach(function () {
|
||||
mockCapability = jasmine.createSpyObj('mutationCapability', [
|
||||
'listen'
|
||||
]);
|
||||
@ -53,11 +53,11 @@ define(
|
||||
controller = new TableOptionsController(mockScope);
|
||||
});
|
||||
|
||||
it('Listens for changing domain object', function() {
|
||||
it('Listens for changing domain object', function () {
|
||||
expect(mockScope.$watch).toHaveBeenCalledWith('domainObject', jasmine.any(Function));
|
||||
});
|
||||
|
||||
it('On destruction of controller, destroys listeners', function() {
|
||||
it('On destruction of controller, destroys listeners', function () {
|
||||
var unlistenFunc = jasmine.createSpy("unlisten");
|
||||
controller.listeners.push(unlistenFunc);
|
||||
expect(mockScope.$on).toHaveBeenCalledWith('$destroy', jasmine.any(Function));
|
||||
@ -65,21 +65,21 @@ define(
|
||||
expect(unlistenFunc).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('Registers a listener for mutation events on the object', function() {
|
||||
it('Registers a listener for mutation events on the object', function () {
|
||||
mockScope.$watch.mostRecentCall.args[1](mockDomainObject);
|
||||
expect(mockCapability.listen).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('Listens for changes to object composition and updates' +
|
||||
' options accordingly', function() {
|
||||
' options accordingly', function () {
|
||||
expect(mockScope.$watchCollection).toHaveBeenCalledWith('configuration.table.columns', jasmine.any(Function));
|
||||
});
|
||||
|
||||
describe('Populates scope with a form definition based on provided' +
|
||||
' column configuration', function() {
|
||||
' column configuration', function () {
|
||||
var mockModel;
|
||||
|
||||
beforeEach(function() {
|
||||
beforeEach(function () {
|
||||
mockModel = {
|
||||
configuration: {
|
||||
table: {
|
||||
@ -87,7 +87,7 @@ define(
|
||||
'column1': true,
|
||||
'column2': true,
|
||||
'column3': false,
|
||||
'column4': true,
|
||||
'column4': true
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -95,19 +95,19 @@ define(
|
||||
controller.populateForm(mockModel);
|
||||
});
|
||||
|
||||
it('creates form on scope', function() {
|
||||
it('creates form on scope', function () {
|
||||
expect(mockScope.columnsForm).toBeDefined();
|
||||
expect(mockScope.columnsForm.sections[0]).toBeDefined();
|
||||
expect(mockScope.columnsForm.sections[0].rows).toBeDefined();
|
||||
expect(mockScope.columnsForm.sections[0].rows.length).toBe(4);
|
||||
});
|
||||
|
||||
it('presents columns as checkboxes', function() {
|
||||
expect(mockScope.columnsForm.sections[0].rows.every(function(row){
|
||||
it('presents columns as checkboxes', function () {
|
||||
expect(mockScope.columnsForm.sections[0].rows.every(function (row) {
|
||||
return row.control === 'checkbox';
|
||||
})).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user