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

@@ -40,28 +40,28 @@ define(
mockSwimlane = jasmine.createSpyObj(
"swimlane",
[ "highlight", "highlightBottom" ]
["highlight", "highlightBottom"]
);
// domainObject, idPath, children, expanded
mockSwimlane.domainObject = jasmine.createSpyObj(
"domainObject",
[ "getId", "getCapability", "useCapability", "hasCapability" ]
["getId", "getCapability", "useCapability", "hasCapability"]
);
mockSwimlane.idPath = [ 'a', 'b' ];
mockSwimlane.children = [ {} ];
mockSwimlane.idPath = ['a', 'b'];
mockSwimlane.children = [{}];
mockSwimlane.expanded = true;
mockSwimlane.parent = {};
mockSwimlane.parent.idPath = ['a'];
mockSwimlane.parent.domainObject = jasmine.createSpyObj(
"domainObject",
[ "getId", "getCapability", "useCapability", "hasCapability" ]
["getId", "getCapability", "useCapability", "hasCapability"]
);
mockSwimlane.parent.children = [ mockSwimlane ];
mockSwimlane.parent.children = [mockSwimlane];
mockSwimlane.children[0].domainObject = jasmine.createSpyObj(
"domainObject",
[ "getId", "getCapability", "useCapability", "hasCapability" ]
["getId", "getCapability", "useCapability", "hasCapability"]
);
mockAction = jasmine.createSpyObj('action', ['perform']);
@@ -72,10 +72,10 @@ define(
mockOtherObject = jasmine.createSpyObj(
"domainObject",
[ "getId", "getCapability", "useCapability", "hasCapability" ]
["getId", "getCapability", "useCapability", "hasCapability"]
);
mockActionCapability = jasmine.createSpyObj("action", ["perform", "getActions"]);
mockContext = jasmine.createSpyObj('context', [ 'getParent' ]);
mockContext = jasmine.createSpyObj('context', ['getParent']);
mockActionCapability.getActions.andReturn([mockAction]);
mockSwimlane.parent.domainObject.getId.andReturn('a');
@@ -148,7 +148,7 @@ define(
});
it("inserts into when highlighted", function () {
var testModel = { composition: [ 'c' ] };
var testModel = { composition: ['c'] };
mockSwimlane.highlight.andReturn(true);
handler.drop('d', mockOtherObject);
// Should have mutated
@@ -161,7 +161,7 @@ define(
});
it("inserts after as a peer when highlighted at the bottom", function () {
var testModel = { composition: [ 'x', 'b', 'y' ] };
var testModel = { composition: ['x', 'b', 'y'] };
mockSwimlane.highlightBottom.andReturn(true);
mockSwimlane.expanded = false;
handler.drop('d', mockOtherObject);
@@ -171,11 +171,11 @@ define(
// Run the mutator
mockSwimlane.parent.domainObject.useCapability.mostRecentCall
.args[1](testModel);
expect(testModel.composition).toEqual([ 'x', 'b', 'd', 'y']);
expect(testModel.composition).toEqual(['x', 'b', 'd', 'y']);
});
it("inserts into when highlighted at the bottom and expanded", function () {
var testModel = { composition: [ 'c' ] };
var testModel = { composition: ['c'] };
mockSwimlane.highlightBottom.andReturn(true);
mockSwimlane.expanded = true;
handler.drop('d', mockOtherObject);
@@ -185,11 +185,11 @@ define(
// Run the mutator
mockSwimlane.domainObject.useCapability.mostRecentCall
.args[1](testModel);
expect(testModel.composition).toEqual([ 'd', 'c' ]);
expect(testModel.composition).toEqual(['d', 'c']);
});
it("inserts after as a peer when highlighted at the bottom and childless", function () {
var testModel = { composition: [ 'x', 'b', 'y' ] };
var testModel = { composition: ['x', 'b', 'y'] };
mockSwimlane.highlightBottom.andReturn(true);
mockSwimlane.expanded = true;
mockSwimlane.children = [];
@@ -200,11 +200,11 @@ define(
// Run the mutator
mockSwimlane.parent.domainObject.useCapability.mostRecentCall
.args[1](testModel);
expect(testModel.composition).toEqual([ 'x', 'b', 'd', 'y']);
expect(testModel.composition).toEqual(['x', 'b', 'd', 'y']);
});
it("allows reordering within a parent", function () {
var testModel = { composition: [ 'x', 'b', 'y', 'd' ] };
var testModel = { composition: ['x', 'b', 'y', 'd'] };
mockSwimlane.highlightBottom.andReturn(true);
mockSwimlane.expanded = true;
@@ -221,7 +221,7 @@ define(
runs(function () {
mockSwimlane.parent.domainObject.useCapability.mostRecentCall
.args[1](testModel);
expect(testModel.composition).toEqual([ 'x', 'b', 'd', 'y']);
expect(testModel.composition).toEqual(['x', 'b', 'd', 'y']);
});
});