mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 05:38:12 +00:00
Merge branch 'open-master' into open1272
Merge in latest from master branch into topic branch for WTD-1272 Conflicts: platform/forms/test/controllers/DateTimeControllerSpec.js
This commit is contained in:
@ -85,10 +85,26 @@ define(
|
||||
expect(mockScope.ngModel.test).toBeUndefined();
|
||||
});
|
||||
|
||||
|
||||
it("exposes date-time format for placeholder", function () {
|
||||
expect(mockScope.format).toEqual(jasmine.any(String));
|
||||
expect(mockScope.format.length).toBeGreaterThan(0);
|
||||
});
|
||||
it("initializes form fields with values from ng-model", function () {
|
||||
mockScope.ngModel = { test: 1417215313000 };
|
||||
mockScope.field = "test";
|
||||
mockScope.$watch.calls.forEach(function (call) {
|
||||
if (call.args[0] === 'ngModel[field]') {
|
||||
call.args[1](mockScope.ngModel.test);
|
||||
}
|
||||
});
|
||||
expect(mockScope.datetime).toEqual({
|
||||
date: "2014-11-28",
|
||||
hour: "22",
|
||||
min: "55",
|
||||
sec: "13"
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user