[New Edit Mode] Added AddAction, modified EditableDomainObject to properly wrap inherited functions, added new EditableInstantiationCapability

This commit is contained in:
Henry
2016-01-20 18:49:39 -08:00
parent fcae3fd7a9
commit c65096f166
13 changed files with 512 additions and 71 deletions

View File

@ -32,11 +32,12 @@ define(
describe("The create action provider", function () {
var mockTypeService,
mockDialogService,
mockCreationService,
mockNavigationService,
mockPolicyService,
mockCreationPolicy,
mockPolicyMap = {},
mockTypes,
mockQ,
provider;
function createMockType(name) {
@ -66,9 +67,9 @@ define(
"dialogService",
[ "getUserInput" ]
);
mockCreationService = jasmine.createSpyObj(
"creationService",
[ "createObject" ]
mockNavigationService = jasmine.createSpyObj(
"navigationService",
[ "setNavigation" ]
);
mockPolicyService = jasmine.createSpyObj(
"policyService",
@ -92,15 +93,14 @@ define(
mockTypeService.listTypes.andReturn(mockTypes);
provider = new CreateActionProvider(
mockQ,
mockTypeService,
mockDialogService,
mockCreationService,
mockNavigationService,
mockPolicyService
);
});
//TODO: Disabled for NEM Beta
xit("exposes one create action per type", function () {
it("exposes one create action per type", function () {
expect(provider.getActions({
key: "create",
domainObject: {}
@ -114,8 +114,7 @@ define(
}).length).toEqual(0);
});
//TODO: Disabled for NEM Beta
xit("does not expose non-creatable types", function () {
it("does not expose non-creatable types", function () {
// One of the types won't have the creation feature...
mockPolicyMap[mockTypes[0].getName()] = false;
// ...so it should have been filtered out.