diff --git a/apps/web/src/app/auth/core/services/registration/registration.play.spec.ts b/apps/web/src/app/auth/core/services/registration/registration.play.spec.ts index 12f3fd2c002..c37a1883cbf 100644 --- a/apps/web/src/app/auth/core/services/registration/registration.play.spec.ts +++ b/apps/web/src/app/auth/core/services/registration/registration.play.spec.ts @@ -1,14 +1,16 @@ import { expect } from "@playwright/test"; -import { Play, test } from "@bitwarden/playwright-helpers"; +import { Play, test, expectUnlockedAs } from "@bitwarden/playwright-helpers"; + +test("registration", async ({ page }) => { + const name = "John Doe"; -test.only("test", async ({ page }) => { await page.goto("https://localhost:8080/#/signup"); await page .getByRole("textbox", { name: "Email address (required)" }) .fill(Play.mangleEmail("create@test.com")); - await page.getByRole("textbox", { name: "Name" }).fill("John Doe"); + await page.getByRole("textbox", { name: "Name" }).fill(name); await page.getByRole("button", { name: "Continue" }).click(); await page .getByRole("textbox", { name: "Master password (required)", exact: true }) @@ -26,10 +28,14 @@ test.only("test", async ({ page }) => { await page.getByRole("checkbox", { name: "Check known data breaches for" }).uncheck(); await page.getByRole("button", { name: "Create account" }).click(); - await expect(page.locator("#bit-dialog-title-0")).toContainText( - "Weak password identified. Use a strong password to protect your account. Are you sure you want to use a weak password?", - ); + await expect(page.locator("#bit-dialog-title-0")).toContainText("Weak master password"); await page.getByRole("button", { name: "Yes" }).click(); await page.getByRole("button", { name: "Add it later" }).click(); await page.getByRole("link", { name: "Skip to web app" }).click(); + + // continue through welcome screen + await page.getByRole("button", { name: "Continue without upgrading" }).click(); + + // assert our user is created + await expectUnlockedAs(name, page); });