static-cms/cypress/utils/dismiss-local-backup.js
Erez Rokah 096b067d45
feat: add translation support (#2870)
* feat: add translation support

* test(cypress): fix locale import

* docs: add locale documentation

* feat: add german translation (#2877)

* fix: locales package version, register all locales in netlify-cms
2019-11-14 11:25:04 +02:00

18 lines
357 B
JavaScript

import { en } from '../../packages/netlify-cms-locales/src';
// Prevents unsaved changes in dev local storage from being used
Cypress.on('window:confirm', message => {
const {
editor: {
editor: { confirmLoadBackup },
},
} = en;
switch (message) {
case confirmLoadBackup:
return false;
default:
return true;
}
});