From e2c6db82597ef0cf9dc45170aaf5d54f671906e6 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 1 Apr 2015 16:08:15 -0700 Subject: [PATCH] [Edit] Stub in specs for Edit policies Stub in specs for policies added for Edit mode which control the availability of the Edit and/or Edit Properties actions in the view-control area, WTD-1062. --- .../test/policies/EditActionPolicySpec.js | 30 +++++++++++++++++++ .../test/policies/EditableViewPolicySpec.js | 20 +++++++++++++ platform/commonUI/edit/test/suite.json | 2 ++ 3 files changed, 52 insertions(+) create mode 100644 platform/commonUI/edit/test/policies/EditActionPolicySpec.js create mode 100644 platform/commonUI/edit/test/policies/EditableViewPolicySpec.js diff --git a/platform/commonUI/edit/test/policies/EditActionPolicySpec.js b/platform/commonUI/edit/test/policies/EditActionPolicySpec.js new file mode 100644 index 0000000000..79b7d585c8 --- /dev/null +++ b/platform/commonUI/edit/test/policies/EditActionPolicySpec.js @@ -0,0 +1,30 @@ +/*global define,describe,it,expect,beforeEach,jasmine*/ + +define( + ["../../src/policies/EditActionPolicy"], + function (EditActionPolicy) { + "use strict"; + + describe("The Edit action policy", function () { + it("allows the edit action when there are editable views", function () { + + }); + + it("allows the edit properties action when there are no editable views", function () { + + }); + + it("disallows the edit action when there are no editable views", function () { + + }); + + it("disallows the edit properties action when there are editable views", function () { + + }); + + it("allows the edit properties outside of the 'view-control' category", function () { + + }); + }); + } +); \ No newline at end of file diff --git a/platform/commonUI/edit/test/policies/EditableViewPolicySpec.js b/platform/commonUI/edit/test/policies/EditableViewPolicySpec.js new file mode 100644 index 0000000000..0883f7636a --- /dev/null +++ b/platform/commonUI/edit/test/policies/EditableViewPolicySpec.js @@ -0,0 +1,20 @@ +/*global define,describe,it,expect,beforeEach,jasmine*/ + +define( + ["../../src/policies/EditableViewPolicy"], + function (EditableViewPolicy) { + "use strict"; + + describe("The editable view policy", function () { + it("disallows views in edit mode that are flagged as non-editable", function () { + + }); + it("allows any view outside of edit mode", function () { + + }); + it("treats views with no defined 'editable' property as editable", function () { + + }); + }); + } +); \ No newline at end of file diff --git a/platform/commonUI/edit/test/suite.json b/platform/commonUI/edit/test/suite.json index 49fffec4a7..17c671b06a 100644 --- a/platform/commonUI/edit/test/suite.json +++ b/platform/commonUI/edit/test/suite.json @@ -17,6 +17,8 @@ "objects/EditableDomainObject", "objects/EditableDomainObjectCache", "objects/EditableModelCache", + "policies/EditableViewPolicy", + "policies/EditActionPolicy", "representers/EditRepresenter", "representers/EditToolbar", "representers/EditToolbarRepresenter",