mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 20:41:49 +03:00
20 lines
624 B
TypeScript
20 lines
624 B
TypeScript
export const testMode = Cypress.env('TEST_MODE');
|
|
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: string | null) => {
|
|
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();
|
|
|
|
/* eslint-disable-next-line cypress/no-unnecessary-waiting */
|
|
cy.wait(7000);
|
|
};
|