mirror of
https://github.com/nasa/openmct.git
synced 2025-04-21 09:31:24 +00:00
Set active role on openmct creation for testing
This commit is contained in:
parent
9050b7a2da
commit
a54bfc7491
@ -31,8 +31,6 @@ describe('The Example User Plugin', () => {
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
const activeOverlays = openmct.overlays.activeOverlays;
|
||||
activeOverlays.forEach((overlay) => overlay.dismiss());
|
||||
return resetApplicationState(openmct);
|
||||
});
|
||||
|
||||
|
@ -25,6 +25,7 @@ import MCT from 'MCT';
|
||||
let nativeFunctions = [];
|
||||
let mockObjects = setMockObjects();
|
||||
|
||||
const EXAMPLE_ROLE = 'flight';
|
||||
const DEFAULT_TIME_OPTIONS = {
|
||||
timeSystemKey: 'utc',
|
||||
bounds: {
|
||||
@ -38,6 +39,7 @@ export function createOpenMct(timeSystemOptions = DEFAULT_TIME_OPTIONS) {
|
||||
openmct.install(openmct.plugins.LocalStorage());
|
||||
openmct.install(openmct.plugins.UTCTimeSystem());
|
||||
openmct.setAssetPath('/base');
|
||||
openmct.user.setActiveRole(EXAMPLE_ROLE);
|
||||
|
||||
const timeSystemKey = timeSystemOptions.timeSystemKey;
|
||||
const start = timeSystemOptions.bounds.start;
|
||||
|
Loading…
x
Reference in New Issue
Block a user