mirror of
https://github.com/nasa/openmct.git
synced 2025-03-22 03:55:31 +00:00
[Copy] Diff between user cancellation and failure
This commit is contained in:
parent
5bc7a701dc
commit
eb91cd33be
@ -141,6 +141,8 @@ define(
|
||||
currentParent
|
||||
).then(function (newParentObj) {
|
||||
return composeService.perform(object, newParentObj);
|
||||
}, function () {
|
||||
return Promise.reject({ message: "cancelled" });
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -117,6 +117,10 @@ define(
|
||||
}
|
||||
|
||||
function error(errorDetails) {
|
||||
if (errorDetails && (errorDetails.message === "cancelled")) {
|
||||
return;
|
||||
}
|
||||
|
||||
var errorDialog,
|
||||
errorMessage = {
|
||||
title: "Error copying objects.",
|
||||
|
@ -157,9 +157,9 @@ define(
|
||||
);
|
||||
});
|
||||
|
||||
it("waits for location from user", function () {
|
||||
it("waits for location and handles cancellation by user", function () {
|
||||
expect(locationServicePromise.then)
|
||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
||||
.toHaveBeenCalledWith(jasmine.any(Function), jasmine.any(Function));
|
||||
});
|
||||
|
||||
it("copies object to selected location", function () {
|
||||
|
@ -180,9 +180,9 @@ define(
|
||||
);
|
||||
});
|
||||
|
||||
it("waits for location from user", function () {
|
||||
it("waits for location and handles cancellation by user", function () {
|
||||
expect(locationServicePromise.then)
|
||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
||||
.toHaveBeenCalledWith(jasmine.any(Function), jasmine.any(Function));
|
||||
});
|
||||
|
||||
it("copies object to selected location", function () {
|
||||
|
@ -133,9 +133,9 @@ define(
|
||||
);
|
||||
});
|
||||
|
||||
it("waits for location from user", function () {
|
||||
it("waits for location and handles cancellation by user", function () {
|
||||
expect(locationServicePromise.then)
|
||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
||||
.toHaveBeenCalledWith(jasmine.any(Function), jasmine.any(Function));
|
||||
});
|
||||
|
||||
it("links object to selected location", function () {
|
||||
|
@ -133,9 +133,9 @@ define(
|
||||
);
|
||||
});
|
||||
|
||||
it("waits for location from user", function () {
|
||||
it("waits for location and handles cancellation by user", function () {
|
||||
expect(locationServicePromise.then)
|
||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
||||
.toHaveBeenCalledWith(jasmine.any(Function), jasmine.any(Function));
|
||||
});
|
||||
|
||||
it("moves object to selected location", function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user