Set active role on openmct creation for testing

This commit is contained in:
Michael Rogers 2023-07-13 10:27:16 -05:00
parent 9050b7a2da
commit a54bfc7491
2 changed files with 2 additions and 2 deletions

View File

@ -31,8 +31,6 @@ describe('The Example User Plugin', () => {
});
afterEach(() => {
const activeOverlays = openmct.overlays.activeOverlays;
activeOverlays.forEach((overlay) => overlay.dismiss());
return resetApplicationState(openmct);
});

View File

@ -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;