[Edit Mode] Renamed function from EditAction.cancel() to EditAction.finish()
This commit is contained in:
@@ -64,7 +64,7 @@ define(
|
|||||||
var editing = currentObject.hasCapability('editor') &&
|
var editing = currentObject.hasCapability('editor') &&
|
||||||
currentObject.getCapability('editor').isEditContextRoot();
|
currentObject.getCapability('editor').isEditContextRoot();
|
||||||
|
|
||||||
return self.$q.when(editing && currentObject.getCapability("editor").cancel());
|
return self.$q.when(editing && currentObject.getCapability("editor").finish());
|
||||||
}
|
}
|
||||||
|
|
||||||
function navigate() {
|
function navigate() {
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ define(
|
|||||||
|
|
||||||
capabilities.editor = jasmine.createSpyObj("editorCapability", [
|
capabilities.editor = jasmine.createSpyObj("editorCapability", [
|
||||||
"isEditContextRoot",
|
"isEditContextRoot",
|
||||||
"cancel"
|
"finish"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
mockNavigatedObject.getCapability.andCallFake(function (capability) {
|
mockNavigatedObject.getCapability.andCallFake(function (capability) {
|
||||||
@@ -148,9 +148,9 @@ define(
|
|||||||
capabilities.editor.isEditContextRoot.andReturn(true);
|
capabilities.editor.isEditContextRoot.andReturn(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("cancels editing if in edit mode", function () {
|
it("finishes editing if in edit mode", function () {
|
||||||
action.perform();
|
action.perform();
|
||||||
expect(capabilities.editor.cancel)
|
expect(capabilities.editor.finish)
|
||||||
.toHaveBeenCalled();
|
.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user