From 0c009d679d8a61ecfa47f142511037d02711a803 Mon Sep 17 00:00:00 2001 From: Zaid Marji Date: Tue, 26 May 2026 07:22:37 +0300 Subject: [PATCH] playwright: fix invitation-accepted toast text + SSO existing-account redirect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bundled web vault renames the org-invitation-acceptance toast from "Invitation accepted" to "Successfully accepted your invitation" in the post-MP-unlock flow used by both invited-with-new-account and invited-with-existing-account tests. Update both specs to match the new toast text. The SSO-side logNewUser flow still emits "Invitation accepted" for the SSO account-creation toast, so setups/sso.ts is left untouched. The SSO invited-with-existing-account flow also no longer auto-redirects to Keycloak — existing emails land on the email-prefilled login form and require an explicit "Use single sign-on" click. Add it before the Keycloak heading assertion. --- playwright/tests/organization.smtp.spec.ts | 4 ++-- playwright/tests/sso_organization.smtp.spec.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/playwright/tests/organization.smtp.spec.ts b/playwright/tests/organization.smtp.spec.ts index 30b3ede2..81bed33e 100644 --- a/playwright/tests/organization.smtp.spec.ts +++ b/playwright/tests/organization.smtp.spec.ts @@ -67,7 +67,7 @@ test('invited with new account', async ({ page }) => { await page.getByRole('button', { name: 'Create account' }).click(); await utils.checkNotification(page, 'Your new account has been created'); - await utils.checkNotification(page, 'Invitation accepted'); + await utils.checkNotification(page, 'Successfully accepted your invitation'); await utils.ignoreExtension(page); // Redirected to the vault @@ -98,7 +98,7 @@ test('invited with existing account', async ({ page }) => { await page.getByLabel('Master password').fill(users.user3.password); await page.getByRole('button', { name: 'Log in with master password' }).click(); - await utils.checkNotification(page, 'Invitation accepted'); + await utils.checkNotification(page, 'Successfully accepted your invitation'); await utils.ignoreExtension(page); // We are now in the default vault page diff --git a/playwright/tests/sso_organization.smtp.spec.ts b/playwright/tests/sso_organization.smtp.spec.ts index ed4a7caf..6c074967 100644 --- a/playwright/tests/sso_organization.smtp.spec.ts +++ b/playwright/tests/sso_organization.smtp.spec.ts @@ -98,6 +98,9 @@ test('invited with existing account', async ({ page }) => { await test.step('Redirect to Keycloak', async () => { await page.goto(link); + // Existing accounts land on the email-prefilled login form rather + // than auto-redirecting; click through to Keycloak explicitly. + await page.getByRole('button', { name: 'Use single sign-on' }).click(); }); await test.step('Keycloak login', async () => { @@ -112,7 +115,7 @@ test('invited with existing account', async ({ page }) => { await page.getByLabel('Master password').fill(users.user3.password); await page.getByRole('button', { name: 'Unlock' }).click(); - await utils.checkNotification(page, 'Invitation accepted'); + await utils.checkNotification(page, 'Successfully accepted your invitation'); await utils.ignoreExtension(page); });