[Time Conductor] Split test cases

Verify table structure separately from table contents
per code review feedback,
https://github.com/nasa/openmctweb/pull/451/files#r48999214
This commit is contained in:
Victor Woeltjen 2016-01-06 13:00:16 -08:00
parent b9146fbeac
commit 2436c32e6d

View File

@ -112,6 +112,18 @@ define(
});
it("exposes times to populate calendar as a table", function () {
// Verify that data structure is as expected by template
expect(mockScope.table).toEqual(jasmine.any(Array));
expect(mockScope.table[0]).toEqual(jasmine.any(Array));
expect(mockScope.table[0][0]).toEqual({
year: jasmine.any(Number),
month: jasmine.any(Number),
day: jasmine.any(Number),
dayOfYear: jasmine.any(Number)
});
});
it("contains the current date in its initial table", function () {
var matchingCell;
// Should be able to find the selected date
mockScope.table.forEach(function (row) {