The greeting it waited for was removed from Home in 449a147.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKL7sUgNWhukDEz95vSMQv
14 lines
546 B
TypeScript
14 lines
546 B
TypeScript
import { expect, type Page } from "@playwright/test"
|
|
|
|
export async function logInUser(page: Page, email: string, password: string) {
|
|
await page.goto("/login")
|
|
|
|
await page.getByTestId("email-input").fill(email)
|
|
await page.getByTestId("password-input").fill(password)
|
|
await page.getByRole("button", { name: "Log In" }).click()
|
|
await page.waitForURL("/")
|
|
// The health heading is the one part of the dashboard that is there whether
|
|
// or not any flows are.
|
|
await expect(page.getByRole("heading", { name: "Health" })).toBeVisible()
|
|
}
|