graphql-engine/console/cypress/helpers/common.js

19 lines
543 B
JavaScript
Raw Normal View History

export const testMode = Cypress.env('TEST_MODE');
2018-07-09 11:04:53 +03:00
export const baseUrl = Cypress.config('baseUrl');
export const migrateUrl = Cypress.env('MIGRATE_URL');
export const migrateModeUrl = `${migrateUrl}/settings`;
// 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);
};