From 6dbc94038256833d06e08cc6bb821da9450cb0b5 Mon Sep 17 00:00:00 2001 From: Krzysztof Bogacki Date: Mon, 6 Nov 2023 14:00:45 +0100 Subject: [PATCH] tests(e2e): ensure only linked providers are shown during reauth --- .../profiles/oidc/settings/success.spec.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/e2e/cypress/integration/profiles/oidc/settings/success.spec.ts b/test/e2e/cypress/integration/profiles/oidc/settings/success.spec.ts index 69f8e0f7d737..63d85009dd9e 100644 --- a/test/e2e/cypress/integration/profiles/oidc/settings/success.spec.ts +++ b/test/e2e/cypress/integration/profiles/oidc/settings/success.spec.ts @@ -196,6 +196,19 @@ context("Social Sign In Settings Success", () => { hydraReauthFails() }) + it("should show only linked providers during reauth", () => { + cy.shortPrivilegedSessionTime() + + cy.get('input[name="password"]').type(gen.password()) + cy.get('[value="password"]').click() + + cy.location("pathname").should("equal", "/login") + + cy.get('[value="hydra"]').should("exist") + cy.get('[value="google"]').should("not.exist") + cy.get('[value="github"]').should("not.exist") + }) + it("settings screen stays intact when the original sign up method gets removed", () => { const expectSettingsOk = () => { cy.get('[value="google"]', { timeout: 1000 })