openmct/e2e/tests/persistence/addNoneditableObject.js
Jamie V 492ff2fa64
[e2e] Persistence tests (#4943)
* initial setup for createButton e2e test

* insignificant change

* export as json

* import tests

* added first of two tests

* add stub

* fixme

* move objects

* added test for menu options for non persistable items

* removing "only" for debuggin test

* removing debug code

* soft assertion for multiple expects

Co-authored-by: unlikelyzero <jchill2@gmail.com>
2022-03-17 14:30:45 -07:00

28 lines
831 B
JavaScript

(function () {
document.addEventListener('DOMContentLoaded', () => {
const PERSISTENCE_KEY = 'persistence-tests';
const openmct = window.openmct;
openmct.objects.addRoot({
namespace: PERSISTENCE_KEY,
key: PERSISTENCE_KEY
});
openmct.objects.addProvider(PERSISTENCE_KEY, {
get(identifier) {
if (identifier.key !== PERSISTENCE_KEY) {
return undefined;
} else {
return Promise.resolve({
identifier,
type: 'folder',
name: 'Persistence Testing',
location: 'ROOT',
composition: []
});
}
}
});
});
}());