mirror of
https://github.com/nasa/openmct.git
synced 2025-03-11 06:54:01 +00:00
[Edit Mode] Renamed function from EditAction.cancel() to EditAction.finish()
This commit is contained in:
parent
275dda820b
commit
98f387b605
@ -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();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user