mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 12:48:14 +00:00
[Time Conductor] Test restoration of old values
...and clarify name of the function in scope which does this.
This commit is contained in:
@ -126,11 +126,12 @@ define(
|
||||
});
|
||||
|
||||
describe("when user input is invalid", function () {
|
||||
var newText, oldValue;
|
||||
var newText, oldText, oldValue;
|
||||
|
||||
beforeEach(function () {
|
||||
newText = "Not a date";
|
||||
oldValue = mockScope.ngModel.testField;
|
||||
oldText = mockScope.textValue;
|
||||
mockScope.textValue = newText;
|
||||
fireWatch("textValue", newText);
|
||||
});
|
||||
@ -146,6 +147,11 @@ define(
|
||||
it("does not modify user input", function () {
|
||||
expect(mockScope.textValue).toEqual(newText);
|
||||
});
|
||||
|
||||
it("restores valid text values on request", function () {
|
||||
mockScope.restoreTextValue();
|
||||
expect(mockScope.textValue).toEqual(oldText);
|
||||
});
|
||||
});
|
||||
|
||||
it("does not modify valid but irregular user input", function () {
|
||||
|
Reference in New Issue
Block a user