Merge branch 'master' into persist-on-mutation-825

Conflicts:
	platform/commonUI/edit/src/actions/RemoveAction.js
	platform/commonUI/edit/test/actions/EditAndComposeActionSpec.js
	platform/commonUI/edit/test/actions/RemoveActionSpec.js
	platform/entanglement/src/services/LinkService.js
	platform/features/timeline/src/controllers/drag/TimelineDragHandler.js
	platform/features/timeline/src/controllers/swimlane/TimelineSwimlaneDecorator.js
	platform/features/timeline/test/controllers/drag/TimelineDragHandlerSpec.js
	platform/features/timeline/test/controllers/swimlane/TimelineSwimlaneDropHandlerSpec.js
This commit is contained in:
Victor Woeltjen
2016-05-20 14:26:39 -07:00
468 changed files with 2151 additions and 1919 deletions

View File

@@ -68,7 +68,7 @@ define(
mockDomainObject.getModel.andReturn({});
mockDomainObject.hasCapability.andReturn(true);
mockDomainObject.useCapability.andReturn(true);
mockDomainObject.getCapability.andCallFake(function(capability){
mockDomainObject.getCapability.andCallFake(function (capability) {
return mockCapabilities[capability];
});

View File

@@ -34,13 +34,13 @@ define(
beforeEach(function () {
mockScope = jasmine.createSpyObj(
'$scope',
[ '$on', '$watch', '$watchCollection', "commit" ]
['$on', '$watch', '$watchCollection', "commit"]
);
mockElement = {};
testAttrs = { toolbar: 'testToolbar' };
mockScope.$parent = jasmine.createSpyObj(
'$parent',
[ '$watch', '$watchCollection' ]
['$watch', '$watchCollection']
);
mockUnwatch = jasmine.createSpy('unwatch');
@@ -92,7 +92,7 @@ define(
// Provide a view which has a toolbar
representer.represent({
toolbar: { sections: [ { items: [ { property: 'k' } ] } ] }
toolbar: { sections: [{ items: [{ property: 'k' }] }] }
});
// Update the selection
@@ -120,7 +120,7 @@ define(
// Provide a view which has a toolbar
representer.represent({
toolbar: { sections: [ { items: [ { property: 'k' } ] } ] }
toolbar: { sections: [{ items: [{ property: 'k' }] }] }
});
// Update the selection
@@ -140,4 +140,4 @@ define(
});
}
);
);

View File

@@ -76,7 +76,7 @@ define(
it("provides properties from the original structure", function () {
expect(
new EditToolbar(testStructure, [ testABC ])
new EditToolbar(testStructure, [testABC])
.getStructure()
.sections[0]
.items[1]
@@ -87,7 +87,7 @@ define(
// This is needed by mct-toolbar
it("adds keys to form structure", function () {
expect(
new EditToolbar(testStructure, [ testABC ])
new EditToolbar(testStructure, [testABC])
.getStructure()
.sections[0]
.items[1]
@@ -97,20 +97,20 @@ define(
it("marks empty sections as hidden", function () {
// Verify that all sections are included when applicable...
toolbar.setSelection([ testABCXYZ ]);
toolbar.setSelection([testABCXYZ]);
expect(toolbar.getStructure().sections.map(getVisibility))
.toEqual([ true, true, false ]);
.toEqual([true, true, false]);
// ...but omitted when only some are applicable
toolbar.setSelection([ testABC ]);
toolbar.setSelection([testABC]);
expect(toolbar.getStructure().sections.map(getVisibility))
.toEqual([ true, false, false ]);
.toEqual([true, false, false]);
});
it("reads properties from selections", function () {
var structure, state;
toolbar.setSelection([ testABC ]);
toolbar.setSelection([testABC]);
structure = toolbar.getStructure();
state = toolbar.getState();
@@ -126,9 +126,11 @@ define(
it("reads properties from getters", function () {
var structure, state;
testABC.a = function () { return "from a getter!"; };
testABC.a = function () {
return "from a getter!";
};
toolbar.setSelection([ testABC ]);
toolbar.setSelection([testABC]);
structure = toolbar.getStructure();
state = toolbar.getState();
@@ -137,7 +139,7 @@ define(
});
it("sets properties on update", function () {
toolbar.setSelection([ testABC ]);
toolbar.setSelection([testABC]);
toolbar.updateState(
toolbar.getStructure().sections[0].items[0].key,
"new value"
@@ -151,7 +153,7 @@ define(
testABC.a = jasmine.createSpy('a');
toolbar.setSelection([ testABC ]);
toolbar.setSelection([testABC]);
structure = toolbar.getStructure();
toolbar.updateState(
@@ -165,7 +167,7 @@ define(
it("provides a return value describing update status", function () {
// Should return true if actually updated, otherwise false
var key;
toolbar.setSelection([ testABC ]);
toolbar.setSelection([testABC]);
key = toolbar.getStructure().sections[0].items[0].key;
expect(toolbar.updateState(key, testABC.a)).toBeFalsy();
expect(toolbar.updateState(key, "new value")).toBeTruthy();
@@ -173,35 +175,35 @@ define(
it("removes inapplicable items", function () {
// First, verify with all items
toolbar.setSelection([ testABC ]);
toolbar.setSelection([testABC]);
expect(toolbar.getStructure().sections[0].items.map(getVisibility))
.toEqual([ true, true, true ]);
.toEqual([true, true, true]);
// Then, try with some items omitted
toolbar.setSelection([ testABC, testAB ]);
toolbar.setSelection([testABC, testAB]);
expect(toolbar.getStructure().sections[0].items.map(getVisibility))
.toEqual([ true, true, false ]);
.toEqual([true, true, false]);
});
it("removes inconsistent states", function () {
// Only two of three values match among these selections
toolbar.setSelection([ testABC, testABC2 ]);
toolbar.setSelection([testABC, testABC2]);
expect(toolbar.getStructure().sections[0].items.map(getVisibility))
.toEqual([ false, true, true ]);
.toEqual([false, true, true]);
});
it("allows inclusive items", function () {
// One inclusive item is in the set, property 'x' of the
// second section; make sure items are pruned down
// when only some of the selection has x,y,z properties
toolbar.setSelection([ testABC, testABCXYZ ]);
toolbar.setSelection([testABC, testABCXYZ]);
expect(toolbar.getStructure().sections[1].items.map(getVisibility))
.toEqual([ true, false, false ]);
.toEqual([true, false, false]);
});
it("removes inclusive items when there are no matches", function () {
toolbar.setSelection([ testABCYZ ]);
toolbar.setSelection([testABCYZ]);
expect(toolbar.getStructure().sections[1].items.map(getVisibility))
.toEqual([ false, true, true ]);
.toEqual([false, true, true]);
});
it("adds click functions when a method is specified", function () {