2019-11-27 11:03:32 +02:00
|
|
|
import './commands';
|
2018-02-18 20:09:32 +02:00
|
|
|
|
2020-05-20 19:35:52 +03:00
|
|
|
Cypress.on('window:before:load', (win) => {
|
2020-01-11 01:51:59 +03:00
|
|
|
// Remove fetch to enable correct api mocking with the cypress xhr mocks
|
2019-12-26 14:18:58 +02:00
|
|
|
win.fetch = null;
|
2020-01-11 01:51:59 +03:00
|
|
|
// 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 20:09:32 +02:00
|
|
|
});
|