Files
resolutionflow/frontend/e2e/helpers/auth.ts
2026-03-16 02:29:22 -04:00

18 lines
610 B
TypeScript

import { expect, type Page } from '@playwright/test'
const TEST_USER_EMAIL =
process.env.PLAYWRIGHT_TEST_EMAIL || 'teamadmin@resolutionflow.example.com'
const TEST_USER_PASSWORD =
process.env.PLAYWRIGHT_TEST_PASSWORD || 'TestPass123!'
export async function signIn(page: Page) {
await page.goto('/login')
await expect(page.getByTestId('login-form')).toBeVisible()
await page.getByLabel('Email address').fill(TEST_USER_EMAIL)
await page.getByLabel('Password').fill(TEST_USER_PASSWORD)
await page.getByTestId('login-submit').click()
await expect(page.getByTestId('app-shell')).toBeVisible()
}