mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 21:28:12 +00:00
* 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:
@ -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(() => {});
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user