From b426d07d00c94b3b9ae5c94c57e63b5ce36f2691 Mon Sep 17 00:00:00 2001 From: Hinton Date: Thu, 9 Oct 2025 18:26:36 -0700 Subject: [PATCH] Use ids --- .../src/app/auth/login/example.play.spec.ts | 19 +++++++---------- .../src/angular/login/login.component.html | 21 ++++++++++++++++--- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/apps/web/src/app/auth/login/example.play.spec.ts b/apps/web/src/app/auth/login/example.play.spec.ts index 00d4b0639c8..69e79f6cac1 100644 --- a/apps/web/src/app/auth/login/example.play.spec.ts +++ b/apps/web/src/app/auth/login/example.play.spec.ts @@ -5,17 +5,14 @@ import { Play, SingleUserRecipe } from "@bitwarden/playwright-scenes"; test("login with password", async ({ page }) => { using scene = await Play.scene(new SingleUserRecipe({ email: "test@example.com" })); - await page.goto("https://localhost:8080/#/login"); - await page.getByRole("textbox", { name: "Email address (required)" }).click(); - await page - .getByRole("textbox", { name: "Email address (required)" }) - .fill(scene.mangle("test@example.com")); - await page.getByRole("textbox", { name: "Email address (required)" }).press("Enter"); - await page.getByRole("textbox", { name: "Master password (required)" }).click(); - await page - .getByRole("textbox", { name: "Master password (required)" }) - .fill(scene.mangle("asdfasdfasdf")); - await page.getByRole("button", { name: "Log in with master password" }).click(); + await page.goto("/#/login"); + + await page.locator("#login_input_email").fill(scene.mangle("test@example.com")); + await page.locator("#login_button_continue").click(); + + await page.locator("#login_input_password").fill("asdfasdfasdf"); + await page.locator("#login_button_submit").click(); + await expect(page.getByRole("button", { name: "Add it later" })).toBeVisible(); await page.getByRole("button", { name: "Add it later" }).click(); await expect(page.locator("bit-simple-dialog")).toContainText( diff --git a/libs/auth/src/angular/login/login.component.html b/libs/auth/src/angular/login/login.component.html index 26e19f11147..ca436fb034f 100644 --- a/libs/auth/src/angular/login/login.component.html +++ b/libs/auth/src/angular/login/login.component.html @@ -1,4 +1,4 @@ - @@ -89,7 +97,14 @@
-