2018-07-03 10:17:08 +03:00
|
|
|
export const testMode = Cypress.env('TEST_MODE');
|
2018-07-09 11:04:53 +03:00
|
|
|
export const baseUrl = Cypress.config('baseUrl');
|
2018-07-03 10:17:08 +03:00
|
|
|
export const migrateUrl = Cypress.env('MIGRATE_URL');
|
|
|
|
export const migrateModeUrl = `${migrateUrl}/settings`;
|
2019-09-10 18:02:04 +03:00
|
|
|
|
|
|
|
// sets value of window.prompt and reloads page
|
|
|
|
export const setPromptValue = value => {
|
|
|
|
cy.log(`Set window.prompt to "${value}"`).then(() => {
|
|
|
|
cy.removeAllListeners('window:before:load');
|
|
|
|
cy.on('window:before:load', win => {
|
|
|
|
cy.stub(win, 'prompt').returns(value);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
cy.reload();
|
|
|
|
|
|
|
|
cy.wait(7000);
|
|
|
|
};
|