mirror of
https://github.com/nasa/openmct.git
synced 2025-01-19 11:17:04 +00:00
[Timeline] Test inclusion of timespan properties
...in prepared data for CSV export
This commit is contained in:
parent
0c2285719e
commit
c23c2b84bf
@ -49,6 +49,11 @@ define(
|
||||
}
|
||||
|
||||
beforeEach(function () {
|
||||
var mockTimespan = jasmine.createSpyObj(
|
||||
'timespan',
|
||||
[ 'getStart', 'getEnd' ]
|
||||
);
|
||||
|
||||
testMetadata = [
|
||||
{ name: "abc", value: 123 },
|
||||
{ name: "xyz", value: 456 }
|
||||
@ -60,6 +65,13 @@ define(
|
||||
{ }
|
||||
].map(makeMockDomainObject);
|
||||
|
||||
mockDomainObjects[1].hasCapability.andCallFake(function (c) {
|
||||
return c === 'timespan';
|
||||
});
|
||||
mockDomainObjects[1].useCapability.andCallFake(function (c) {
|
||||
return c === 'timespan' ? Promise.resolve(mockTimespan) :
|
||||
c === 'metadata' ? [] : undefined;
|
||||
});
|
||||
mockDomainObjects[2].useCapability.andCallFake(function (c) {
|
||||
return c === 'metadata' && testMetadata;
|
||||
});
|
||||
@ -105,6 +117,11 @@ define(
|
||||
.not.toEqual(-1);
|
||||
});
|
||||
});
|
||||
|
||||
it("contains timespan properties", function () {
|
||||
expect(headers.indexOf("Start")).not.toEqual(-1);
|
||||
expect(headers.indexOf("End")).not.toEqual(-1);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user