mirror of
https://github.com/nasa/openmct.git
synced 2025-01-17 10:20:27 +00:00
[Persistence] Update move/copy/link specs
...to reflect re-consultation of policyService when the action context changes due to dialog input.
This commit is contained in:
parent
76c1f5bfe9
commit
7114e9b150
@ -34,6 +34,7 @@ define(
|
|||||||
describe("Move/copy/link Actions", function () {
|
describe("Move/copy/link Actions", function () {
|
||||||
|
|
||||||
var action,
|
var action,
|
||||||
|
policyService,
|
||||||
locationService,
|
locationService,
|
||||||
locationServicePromise,
|
locationServicePromise,
|
||||||
composeService,
|
composeService,
|
||||||
@ -44,6 +45,11 @@ define(
|
|||||||
newParent;
|
newParent;
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
|
policyService = jasmine.createSpyObj(
|
||||||
|
'policyService',
|
||||||
|
[ 'allow' ]
|
||||||
|
);
|
||||||
|
|
||||||
selectedObjectContextCapability = jasmine.createSpyObj(
|
selectedObjectContextCapability = jasmine.createSpyObj(
|
||||||
'selectedObjectContextCapability',
|
'selectedObjectContextCapability',
|
||||||
[
|
[
|
||||||
@ -87,6 +93,8 @@ define(
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
policyService.allow.andReturn(true);
|
||||||
|
|
||||||
locationService
|
locationService
|
||||||
.getLocationFromUser
|
.getLocationFromUser
|
||||||
.andReturn(locationServicePromise);
|
.andReturn(locationServicePromise);
|
||||||
@ -102,6 +110,7 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
action = new AbstractComposeAction(
|
action = new AbstractComposeAction(
|
||||||
|
policyService,
|
||||||
locationService,
|
locationService,
|
||||||
composeService,
|
composeService,
|
||||||
context,
|
context,
|
||||||
@ -153,6 +162,7 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
action = new AbstractComposeAction(
|
action = new AbstractComposeAction(
|
||||||
|
policyService,
|
||||||
locationService,
|
locationService,
|
||||||
composeService,
|
composeService,
|
||||||
context,
|
context,
|
||||||
|
@ -34,6 +34,7 @@ define(
|
|||||||
describe("Copy Action", function () {
|
describe("Copy Action", function () {
|
||||||
|
|
||||||
var copyAction,
|
var copyAction,
|
||||||
|
policyService,
|
||||||
locationService,
|
locationService,
|
||||||
locationServicePromise,
|
locationServicePromise,
|
||||||
copyService,
|
copyService,
|
||||||
@ -50,6 +51,12 @@ define(
|
|||||||
progress = {phase: "copying", totalObjects: 10, processed: 1};
|
progress = {phase: "copying", totalObjects: 10, processed: 1};
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
|
policyService = jasmine.createSpyObj(
|
||||||
|
'policyService',
|
||||||
|
[ 'allow' ]
|
||||||
|
);
|
||||||
|
policyService.allow.andReturn(true);
|
||||||
|
|
||||||
selectedObjectContextCapability = jasmine.createSpyObj(
|
selectedObjectContextCapability = jasmine.createSpyObj(
|
||||||
'selectedObjectContextCapability',
|
'selectedObjectContextCapability',
|
||||||
[
|
[
|
||||||
@ -142,6 +149,7 @@ define(
|
|||||||
|
|
||||||
copyAction = new CopyAction(
|
copyAction = new CopyAction(
|
||||||
mockLog,
|
mockLog,
|
||||||
|
policyService,
|
||||||
locationService,
|
locationService,
|
||||||
copyService,
|
copyService,
|
||||||
dialogService,
|
dialogService,
|
||||||
@ -201,6 +209,7 @@ define(
|
|||||||
|
|
||||||
copyAction = new CopyAction(
|
copyAction = new CopyAction(
|
||||||
mockLog,
|
mockLog,
|
||||||
|
policyService,
|
||||||
locationService,
|
locationService,
|
||||||
copyService,
|
copyService,
|
||||||
dialogService,
|
dialogService,
|
||||||
|
@ -34,6 +34,7 @@ define(
|
|||||||
describe("Link Action", function () {
|
describe("Link Action", function () {
|
||||||
|
|
||||||
var linkAction,
|
var linkAction,
|
||||||
|
policyService,
|
||||||
locationService,
|
locationService,
|
||||||
locationServicePromise,
|
locationServicePromise,
|
||||||
linkService,
|
linkService,
|
||||||
@ -44,6 +45,12 @@ define(
|
|||||||
newParent;
|
newParent;
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
|
policyService = jasmine.createSpyObj(
|
||||||
|
'policyService',
|
||||||
|
[ 'allow' ]
|
||||||
|
);
|
||||||
|
policyService.allow.andReturn(true);
|
||||||
|
|
||||||
selectedObjectContextCapability = jasmine.createSpyObj(
|
selectedObjectContextCapability = jasmine.createSpyObj(
|
||||||
'selectedObjectContextCapability',
|
'selectedObjectContextCapability',
|
||||||
[
|
[
|
||||||
@ -102,6 +109,7 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
linkAction = new LinkAction(
|
linkAction = new LinkAction(
|
||||||
|
policyService,
|
||||||
locationService,
|
locationService,
|
||||||
linkService,
|
linkService,
|
||||||
context
|
context
|
||||||
@ -152,6 +160,7 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
linkAction = new LinkAction(
|
linkAction = new LinkAction(
|
||||||
|
policyService,
|
||||||
locationService,
|
locationService,
|
||||||
linkService,
|
linkService,
|
||||||
context
|
context
|
||||||
|
@ -34,6 +34,7 @@ define(
|
|||||||
describe("Move Action", function () {
|
describe("Move Action", function () {
|
||||||
|
|
||||||
var moveAction,
|
var moveAction,
|
||||||
|
policyService,
|
||||||
locationService,
|
locationService,
|
||||||
locationServicePromise,
|
locationServicePromise,
|
||||||
moveService,
|
moveService,
|
||||||
@ -44,6 +45,12 @@ define(
|
|||||||
newParent;
|
newParent;
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
|
policyService = jasmine.createSpyObj(
|
||||||
|
'policyService',
|
||||||
|
[ 'allow' ]
|
||||||
|
);
|
||||||
|
policyService.allow.andReturn(true);
|
||||||
|
|
||||||
selectedObjectContextCapability = jasmine.createSpyObj(
|
selectedObjectContextCapability = jasmine.createSpyObj(
|
||||||
'selectedObjectContextCapability',
|
'selectedObjectContextCapability',
|
||||||
[
|
[
|
||||||
@ -102,6 +109,7 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
moveAction = new MoveAction(
|
moveAction = new MoveAction(
|
||||||
|
policyService,
|
||||||
locationService,
|
locationService,
|
||||||
moveService,
|
moveService,
|
||||||
context
|
context
|
||||||
@ -152,6 +160,7 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
moveAction = new MoveAction(
|
moveAction = new MoveAction(
|
||||||
|
policyService,
|
||||||
locationService,
|
locationService,
|
||||||
moveService,
|
moveService,
|
||||||
context
|
context
|
||||||
|
Loading…
Reference in New Issue
Block a user