mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 07:38:15 +00:00
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:
@ -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', () => {
|
||||
|
Reference in New Issue
Block a user