diff --git a/test/e2e/cypress/integration/profiles/oidc/login/success.spec.ts b/test/e2e/cypress/integration/profiles/oidc/login/success.spec.ts index adb91f699b3c..51ccf8574a6f 100644 --- a/test/e2e/cypress/integration/profiles/oidc/login/success.spec.ts +++ b/test/e2e/cypress/integration/profiles/oidc/login/success.spec.ts @@ -67,7 +67,7 @@ context("Social Sign In Successes", () => { cy.location("href").should("eq", "https://www.example.org/") cy.logout() cy.noSession() - cy.intercept("POST", "**/self-service/login*").as("getHydraLogin") + cy.intercept("GET", "**/oauth2/auth*").as("getHydraLogin") cy.loginOidc({ app, url: login + "?return_to=https://www.example.org/", @@ -77,9 +77,9 @@ context("Social Sign In Successes", () => { cy.addInputElement("form", "upstream_parameters.login_hint", email) }, }) - // once a request to get settings responds, 'cy.wait' will resolve + // once a request to getHydraLogin responds, 'cy.wait' will resolve cy.wait("@getHydraLogin") - .its("response.headers.location") + .its("request.url") .should("include", "login_hint=" + encodeURIComponent(email)) cy.location("href").should("eq", "https://www.example.org/") diff --git a/test/e2e/cypress/integration/profiles/oidc/registration/success.spec.ts b/test/e2e/cypress/integration/profiles/oidc/registration/success.spec.ts index 94172f580ef7..53c5a3fd73a8 100644 --- a/test/e2e/cypress/integration/profiles/oidc/registration/success.spec.ts +++ b/test/e2e/cypress/integration/profiles/oidc/registration/success.spec.ts @@ -198,17 +198,17 @@ context("Social Sign Up Successes", () => { it("should be able to register with upstream parameters", () => { const email = gen.email() - cy.intercept("**/self-service/registration*").as("getHydraRegistration") + cy.intercept("GET", "**/oauth2/auth*").as("getHydraRegistration") cy.visit(registration + "?return_to=https://www.example.org/") - cy.addInputElement("form", "login_hint", email) + cy.addInputElement("form", "upstream_parameters.login_hint", email) cy.triggerOidc(app) - // once a request to get settings responds, 'cy.wait' will resolve + // once a request to getHydraRegistration responds, 'cy.wait' will resolve cy.wait("@getHydraRegistration") - .its("response.headers.location") + .its("request.url") .should("include", "login_hint=" + encodeURIComponent(email)) }) })