static-cms/cypress/utils/dismiss-local-backup.js
2019-03-25 14:17:26 -04:00

18 lines
361 B
JavaScript

import { getPhrases } from 'Constants/defaultPhrases';
// Prevents unsaved changes in dev local storage from being used
Cypress.on('window:confirm', message => {
const {
editor: {
editor: { confirmLoadBackup },
},
} = getPhrases();
switch (message) {
case confirmLoadBackup:
return false;
default:
return true;
}
});