diff --git a/e2e-tests/cypress/tests/cypress/support/step_definitions/user_authentication_steps.ts b/e2e-tests/cypress/tests/cypress/support/step_definitions/user_authentication_steps.ts index 67a64eba0..bc637fdbb 100644 --- a/e2e-tests/cypress/tests/cypress/support/step_definitions/user_authentication_steps.ts +++ b/e2e-tests/cypress/tests/cypress/support/step_definitions/user_authentication_steps.ts @@ -16,9 +16,19 @@ When("the user submits no credentials", () => { When( "the user submits the credentials {string} {string}", (email: string, password: string) => { + cy.intercept("POST", "/graphql").as("login"); + // cy.intercept('POST', '/graphql', (req) => { + // if (req.body.hasOwnProperty('query') && req.body.query.includes('mutation')) { + // req.alias = 'login' + // } + // }); + loginPage.enterEmail(email); loginPage.enterPassword(password); loginPage.submitLogin(); + cy.wait("@login").then((interception) => { + expect(JSON.stringify(interception.response.body)).contains(email); + }); } );