Browse Source

playwright: fix invitation-accepted toast text + SSO existing-account redirect

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.
pull/7248/head
Zaid Marji 3 weeks ago
parent
commit
0c009d679d
  1. 4
      playwright/tests/organization.smtp.spec.ts
  2. 5
      playwright/tests/sso_organization.smtp.spec.ts

4
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

5
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);
});

Loading…
Cancel
Save