2019-11-27 14:33:32 +05:30
|
|
|
import './commands';
|
2018-02-18 23:39:32 +05:30
|
|
|
|
2019-11-27 14:33:32 +05:30
|
|
|
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
|
2019-12-26 17:48:58 +05:30
|
|
|
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'];
|
|
|
|
},
|
|
|
|
});
|
2018-02-18 23:39:32 +05:30
|
|
|
});
|