2019-11-14 11:25:04 +02:00
|
|
|
import { en } from '../../packages/netlify-cms-locales/src';
|
2019-03-25 18:17:26 +00:00
|
|
|
|
|
|
|
// Prevents unsaved changes in dev local storage from being used
|
|
|
|
Cypress.on('window:confirm', message => {
|
|
|
|
const {
|
|
|
|
editor: {
|
|
|
|
editor: { confirmLoadBackup },
|
|
|
|
},
|
2019-11-14 11:25:04 +02:00
|
|
|
} = en;
|
2019-03-25 18:17:26 +00:00
|
|
|
|
|
|
|
switch (message) {
|
|
|
|
case confirmLoadBackup:
|
|
|
|
return false;
|
|
|
|
default:
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
});
|