Add Playwright e2e coverage and Node 20 pin
This commit is contained in:
17
frontend/e2e/helpers/auth.ts
Normal file
17
frontend/e2e/helpers/auth.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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()
|
||||
}
|
||||
Reference in New Issue
Block a user