mirror of
https://github.com/nasa/openmct.git
synced 2025-03-28 06:38:40 +00:00
[Copy] Diff between user cancellation and failure
This commit is contained in:
parent
5bc7a701dc
commit
eb91cd33be
platform/entanglement
@ -141,6 +141,8 @@ define(
|
|||||||
currentParent
|
currentParent
|
||||||
).then(function (newParentObj) {
|
).then(function (newParentObj) {
|
||||||
return composeService.perform(object, newParentObj);
|
return composeService.perform(object, newParentObj);
|
||||||
|
}, function () {
|
||||||
|
return Promise.reject({ message: "cancelled" });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -117,6 +117,10 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function error(errorDetails) {
|
function error(errorDetails) {
|
||||||
|
if (errorDetails && (errorDetails.message === "cancelled")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var errorDialog,
|
var errorDialog,
|
||||||
errorMessage = {
|
errorMessage = {
|
||||||
title: "Error copying objects.",
|
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)
|
expect(locationServicePromise.then)
|
||||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
.toHaveBeenCalledWith(jasmine.any(Function), jasmine.any(Function));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("copies object to selected location", 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)
|
expect(locationServicePromise.then)
|
||||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
.toHaveBeenCalledWith(jasmine.any(Function), jasmine.any(Function));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("copies object to selected location", 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)
|
expect(locationServicePromise.then)
|
||||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
.toHaveBeenCalledWith(jasmine.any(Function), jasmine.any(Function));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("links object to selected location", 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)
|
expect(locationServicePromise.then)
|
||||||
.toHaveBeenCalledWith(jasmine.any(Function));
|
.toHaveBeenCalledWith(jasmine.any(Function), jasmine.any(Function));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("moves object to selected location", function () {
|
it("moves object to selected location", function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user