From 557cd91b216f3a845ccd658b0b7a0d57d46b160c Mon Sep 17 00:00:00 2001 From: Deep Tailor Date: Thu, 4 Jan 2018 11:13:53 -0800 Subject: [PATCH] fix tests --- .../edit/src/controllers/EditObjectController.js | 16 ++++++++-------- .../test/controllers/EditObjectControllerSpec.js | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/platform/commonUI/edit/src/controllers/EditObjectController.js b/platform/commonUI/edit/src/controllers/EditObjectController.js index 428ab06371..b63e6b3bf1 100644 --- a/platform/commonUI/edit/src/controllers/EditObjectController.js +++ b/platform/commonUI/edit/src/controllers/EditObjectController.js @@ -28,15 +28,15 @@ define( [], function () { - function isDirty(domainObject) { - var navigatedObject = domainObject, - editorCapability = navigatedObject && - navigatedObject.getCapability("editor"); + // function isDirty(domainObject) { + // var navigatedObject = domainObject, + // editorCapability = navigatedObject && + // navigatedObject.getCapability("editor"); - return editorCapability && - editorCapability.isEditContextRoot() && - editorCapability.dirty(); - } + // return editorCapability && + // editorCapability.isEditContextRoot() && + // editorCapability.dirty(); + // } function cancelEditing(domainObject) { var navigatedObject = domainObject, diff --git a/platform/commonUI/edit/test/controllers/EditObjectControllerSpec.js b/platform/commonUI/edit/test/controllers/EditObjectControllerSpec.js index eb8f4c319d..2d3747f08f 100644 --- a/platform/commonUI/edit/test/controllers/EditObjectControllerSpec.js +++ b/platform/commonUI/edit/test/controllers/EditObjectControllerSpec.js @@ -104,10 +104,10 @@ define( mockEditorCapability.isEditContextRoot.andReturn(false); mockEditorCapability.dirty.andReturn(false); - expect(checkFn()).toBe(false); + expect(checkFn()).toBe("Continuing will cause the loss of any unsaved changes."); mockEditorCapability.isEditContextRoot.andReturn(true); - expect(checkFn()).toBe(false); + expect(checkFn()).toBe("Continuing will cause the loss of any unsaved changes."); mockEditorCapability.dirty.andReturn(true); expect(checkFn())