[Browse composition] Cleanup

Removed commented out code in tests. Issue 11.
This commit is contained in:
Sarah Hale 2015-06-18 14:29:46 -07:00
parent 9e52ddaee7
commit 451842fb82
2 changed files with 1 additions and 43 deletions

View File

@ -112,6 +112,7 @@ define(
// Informs user that drag and drop is not allowed.
// window.alert("Cannot drag and drop objects during browse mode.");
}
}
// We can only handle drops if we have access to actions...

View File

@ -132,35 +132,6 @@ define(
expect(mockEvent.dataTransfer.dropEffect).toBeDefined();
});
/*
it("invokes compose on drop in browse", function () {
callbacks.dragover(mockEvent);
expect(mockAction.getActions).toHaveBeenCalledWith({
key: 'compose',
selectedObject: mockDraggedObject
});
callbacks.drop(mockEvent);
mockDomainObject.useCapability('browse');
var mockDomainObjectType = mockDomainObject.getModel().type;
// if (mockDomainObjectType === 'folder' || mockDomainObject.hasCapability('editor') {
expect((mockCompose.perform)).toHaveBeenCalled();
// }
});
*/
// it("invokes compose on drop in edit", function () {
// callbacks.dragover(mockEvent);
// expect(mockAction.getActions).toHaveBeenCalledWith({
// key: 'compose',
// selectedObject: mockDraggedObject
// });
// callbacks.drop(mockEvent);
// mockDomainObject.useCapability('editor');
// if (mockDomainObjectType === 'folder' || mockDomainObject.hasCapability('editor') {
// expect((mockCompose.perform)).toHaveBeenCalled();
// }
// });
it("invokes compose on drop in edit mode", function () {
// Set the mockDomainObject to have the editor capability
mockDomainObject.hasCapability.andReturn(true);
@ -206,20 +177,6 @@ define(
expect(mockCompose.perform).toHaveBeenCalled();
});
/*
it("does not invoke compose on drop in browse mode for non-folders", function () {
if (mockDomainObject.hasCapability('editor') === false && !(domainObject.getModel().type === 'folder')) {
callbacks.dragover(mockEvent);
expect(mockAction.getActions).toHaveBeenCalledWith({
key: 'compose',
selectedObject: mockDraggedObject
});
callbacks.drop(mockEvent);
expect(mockCompose.perform).not.toHaveBeenCalled();
}
});
*/
it("broadcasts drop position (in edit mode)", function () {
// Set the mockDomainObject to have the editor capability
mockDomainObject.hasCapability.andReturn(true);