mirror of
https://github.com/nasa/openmct.git
synced 2025-01-19 11:17:04 +00:00
[Time Conductor] Update spec
Verify that validation occurs against state in formModel; remove obsolete test case for enforcing minimum outer span
This commit is contained in:
parent
bb993dc94f
commit
3b5c1bf2e6
@ -93,7 +93,7 @@ define(
|
||||
|
||||
it("exposes start time validator", function () {
|
||||
var testValue = 42000000;
|
||||
mockScope.ngModel.outer = { end: testValue };
|
||||
mockScope.formModel = { end: testValue };
|
||||
expect(mockScope.validateStart(testValue + 1))
|
||||
.toBe(false);
|
||||
expect(mockScope.validateStart(testValue - 60 * 60 * 1000 - 1))
|
||||
@ -102,7 +102,7 @@ define(
|
||||
|
||||
it("exposes end time validator", function () {
|
||||
var testValue = 42000000;
|
||||
mockScope.ngModel.outer = { start: testValue };
|
||||
mockScope.formModel = { start: testValue };
|
||||
expect(mockScope.validateEnd(testValue - 1))
|
||||
.toBe(false);
|
||||
expect(mockScope.validateEnd(testValue + 60 * 60 * 1000 + 1))
|
||||
@ -212,26 +212,6 @@ define(
|
||||
fireWatchCollection("ngModel", mockScope.ngModel);
|
||||
});
|
||||
|
||||
it("enforces a minimum outer span", function () {
|
||||
mockScope.ngModel.outer.end =
|
||||
mockScope.ngModel.outer.start - DAY * 100;
|
||||
fireWatch(
|
||||
"ngModel.outer.end",
|
||||
mockScope.ngModel.outer.end
|
||||
);
|
||||
expect(mockScope.ngModel.outer.end)
|
||||
.toBeGreaterThan(mockScope.ngModel.outer.start);
|
||||
|
||||
mockScope.ngModel.outer.start =
|
||||
mockScope.ngModel.outer.end + DAY * 100;
|
||||
fireWatch(
|
||||
"ngModel.outer.start",
|
||||
mockScope.ngModel.outer.start
|
||||
);
|
||||
expect(mockScope.ngModel.outer.end)
|
||||
.toBeGreaterThan(mockScope.ngModel.outer.start);
|
||||
});
|
||||
|
||||
it("enforces a minimum inner span when outer span changes", function () {
|
||||
mockScope.ngModel.outer.end =
|
||||
mockScope.ngModel.outer.start - DAY * 100;
|
||||
|
Loading…
Reference in New Issue
Block a user