Implement transactions in Object API and retire legacy transactions #4089 (#4195)

* Implement transactions in Object API and retire legacy transactions #4089
* Added `objectAPI.refresh`

Co-authored-by: Andrew Henry <akhenry@gmail.com>
This commit is contained in:
Nikhil
2021-10-25 13:13:17 -07:00
committed by GitHub
parent 5eaf222f88
commit d0c5731287
27 changed files with 170 additions and 1654 deletions

View File

@ -148,10 +148,14 @@ describe("Notebook plugin:", () => {
'observe'
]);
openmct.editor = {};
openmct.editor.isEditing = () => false;
const applicableViews = openmct.objectViews.get(notebookViewObject, [notebookViewObject]);
notebookViewProvider = applicableViews.find(viewProvider => viewProvider.key === 'notebook-vue');
testObjectProvider.get.and.returnValue(Promise.resolve(notebookViewObject));
testObjectProvider.create.and.returnValue(Promise.resolve(notebookViewObject));
openmct.objects.addProvider('test-namespace', testObjectProvider);
testObjectProvider.observe.and.returnValue(() => {});

View File

@ -110,8 +110,7 @@ export default class Snapshot {
}
return () => {
const path = window.location.href.split('#');
window.location.href = path[0] + url;
window.location.href = window.location.origin + url;
};
}
}

View File

@ -44,6 +44,7 @@ const notebookDomainObject = {
namespace: ''
},
type: 'notebook',
name: 'Test Notebook',
configuration: {
defaultSort: 'oldest',
entries: notebookEntries,
@ -118,6 +119,12 @@ describe('Notebook Entries:', () => {
'create',
'update'
]));
openmct.editor = {
isEditing: () => false
};
openmct.objects.isPersistable = () => true;
openmct.objects.save = () => Promise.resolve(true);
window.localStorage.setItem('notebook-storage', null);
});