accounts-frontend/tests-e2e/cypress/support/index.js

14 lines
479 B
JavaScript
Raw Normal View History

import './commands';
Cypress.on('window:before:load', (win) => {
2020-01-11 04:21:59 +05:30
// Remove fetch to enable correct api mocking with the cypress xhr mocks
win.fetch = null;
2020-01-11 04:21:59 +05:30
// The browser extends the system's language. Not everyone so cool to use English on their workstation,
// so we must force browser's language to be English to let tests, based on buttons labels, work
Object.defineProperty(win.navigator, 'languages', {
get() {
return ['en-US', 'en'];
},
});
});