diff --git a/e2e-tests/cypress/tests/cypress.config.ts b/e2e-tests/cypress/tests/cypress.config.ts index 9621b7a00..a9627c5ae 100644 --- a/e2e-tests/cypress/tests/cypress.config.ts +++ b/e2e-tests/cypress/tests/cypress.config.ts @@ -2,6 +2,8 @@ import { defineConfig } from "cypress"; import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor"; import browserify from "@badeball/cypress-cucumber-preprocessor/browserify"; +let resetPasswordLink: string; + async function setupNodeEvents( on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions @@ -15,6 +17,15 @@ async function setupNodeEvents( }) ); + on("task", { + setResetPasswordLink: (val) => { + return (resetPasswordLink = val); + }, + getResetPasswordLink: () => { + return resetPasswordLink; + }, + }); + on("after:run", (results) => { if (results) { // results will be undefined in interactive mode @@ -30,6 +41,7 @@ export default defineConfig({ e2e: { specPattern: "**/*.feature", excludeSpecPattern: "*.js", + experimentalSessionAndOrigin: true, baseUrl: "http://localhost:3000", chromeWebSecurity: false, defaultCommandTimeout: 10000, @@ -43,6 +55,7 @@ export default defineConfig({ }, env: { backendURL: "http://localhost:4000", + mailserverURL: "http://localhost:1080", loginQuery: `query ($email: String!, $password: String!, $publisherId: Int) { login(email: $email, password: $password, publisherId: $publisherId) { email