mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 23:36:41 +00:00
[Timeline] Add more tests for rows
This commit is contained in:
parent
938c266b4e
commit
fd92c5f970
@ -54,19 +54,33 @@ define(
|
||||
exporter = new TimelineCSVExporter(mockDomainObjects);
|
||||
});
|
||||
|
||||
it("includes one row per domain object", function () {
|
||||
var mockCallback = jasmine.createSpy('callback');
|
||||
exporter.rows().then(mockCallback);
|
||||
describe("rows", function () {
|
||||
var rows;
|
||||
|
||||
beforeEach(function () {
|
||||
exporter.rows().then(function (r) {
|
||||
rows = r;
|
||||
});
|
||||
waitsFor(function () {
|
||||
return mockCallback.calls.length > 0;
|
||||
});
|
||||
runs(function () {
|
||||
expect(mockCallback.mostRecentCall.args[0].length)
|
||||
.toEqual(mockDomainObjects.length);
|
||||
return rows !== undefined;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
it("include one row per domain object", function () {
|
||||
expect(rows.length).toEqual(mockDomainObjects.length);
|
||||
});
|
||||
|
||||
it("includes identifiers for each domain object", function () {
|
||||
rows.forEach(function (row, index) {
|
||||
var id = mockDomainObjects[index].getId();
|
||||
expect(row.indexOf(id)).not.toEqual(-1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
);
|
Loading…
Reference in New Issue
Block a user