Mct4041 - Reimplement in-memory search (#4527)

Re-implements the in-memory search index sans Angular

Co-authored-by: Andrew Henry <akhenry@gmail.com>
Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: John Hill <jchill2.spam@gmail.com>
This commit is contained in:
Scott Bell
2021-12-16 01:13:41 +01:00
committed by GitHub
parent e18c7562ae
commit 1f588a2a6e
24 changed files with 627 additions and 2409 deletions

View File

@ -66,7 +66,6 @@ describe('the plugin', () => {
openmct.install(new CouchPlugin(options));
openmct.types.addType('notebook', {creatable: true});
openmct.setAssetPath('/base');
openmct.on('start', done);
openmct.startHeadless();
@ -130,6 +129,7 @@ describe('the plugin', () => {
it('works without Shared Workers', async () => {
let sharedWorkerCallback;
const restoreSharedWorker = window.SharedWorker;
window.SharedWorker = undefined;
const mockEventSource = {
addEventListener: (topic, addedListener) => {
@ -164,7 +164,7 @@ describe('the plugin', () => {
expect(provider.create).toHaveBeenCalled();
expect(provider.startSharedWorker).not.toHaveBeenCalled();
//Set modified timestamp it detects a change and persists the updated model.
mockDomainObject.modified = Date.now();
mockDomainObject.modified = mockDomainObject.persisted + 1;
const updatedResult = await openmct.objects.save(mockDomainObject);
openmct.objects.observe(mockDomainObject, '*', (updatedObject) => {
});
@ -173,6 +173,7 @@ describe('the plugin', () => {
expect(provider.fetchChanges).toHaveBeenCalled();
sharedWorkerCallback(fakeUpdateEvent);
expect(provider.onEventMessage).toHaveBeenCalled();
window.SharedWorker = restoreSharedWorker;
});
});
describe('batches requests', () => {