temp changes
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m59s
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m59s
This commit is contained in:
18
frontend/vue-app/e2e/auth-no-pin.setup.ts
Normal file
18
frontend/vue-app/e2e/auth-no-pin.setup.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { test as setup } from '@playwright/test'
|
||||
import { STORAGE_STATE_NO_PIN, E2E_EMAIL, E2E_PASSWORD } from './e2e-constants'
|
||||
|
||||
setup('authenticate without parent pin', async ({ page }) => {
|
||||
await page.goto('/auth/login')
|
||||
|
||||
await page.getByLabel('Email address').fill(E2E_EMAIL)
|
||||
await page.getByLabel('Password').fill(E2E_PASSWORD)
|
||||
await page.getByRole('button', { name: 'Sign in' }).click()
|
||||
|
||||
// Wait for redirect to the authenticated area
|
||||
await page.waitForURL(/\/(parent|child)/)
|
||||
|
||||
// Remove parent auth from localStorage so the PIN prompt appears
|
||||
await page.evaluate(() => localStorage.removeItem('parentAuth'))
|
||||
|
||||
await page.context().storageState({ path: STORAGE_STATE_NO_PIN })
|
||||
})
|
||||
Reference in New Issue
Block a user