unit tests

This commit is contained in:
Martin McKeaveney 2020-02-11 21:39:20 +00:00
parent 5795a78cd5
commit f12c6452e4
2 changed files with 3 additions and 1 deletions

View File

@ -467,11 +467,11 @@ const _saveScreen = (store, s, screen) => {
api
.post(`/_builder/api/${s.appname}/pages/${s.currentPageName}/screen`, screen)
.then(async savedScreen => {
_savePage(s);
const updatedScreen = await savedScreen.json();
const screens = [...currentPageScreens.filter(storeScreen => storeScreen.name !== updatedScreen.name), updatedScreen];
s.pages[s.currentPageName]._screens = screens
s.screens = screens
_savePage(s);
});
return s

View File

@ -0,0 +1,2 @@
window['##BUDIBASE_FRONTEND_DEINITION##'] = {"componentLibraries":[{"importPath":"/lib/customComponents/index.js","libName":"./customComponents"},{"importPath":"/lib/moreCustomComponents/index.js","libName":"./moreCustomComponents"}],"appRootPath":"","page":{"title":"Test App","favicon":"./_shared/favicon.png","stylesheets":["my-styles.css"],"componentLibraries":["./customComponents","./moreCustomComponents"],"props":{"_component":"@budibase/standard-components/div"}},"screens":[{"name":"screen1","description":"","props":{"_component":"@budibase/standard-components/div","className":""},"_css":"/css/d121e1ecc6cf44f433213222e9ff5d40.css"},{"name":"screen2","description":"","props":{"_component":"@budibase/standard-components/div","className":""},"_css":"/css/7b7c05b78e05c06eb8d69475caadfea3.css"}]};
window['##BUDIBASE_FRONTEND_FUNCTIONS##'] = {'1234':() => 'test return'}