more tests
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m30s

This commit is contained in:
2026-03-09 13:28:43 -04:00
parent 2c65d3ecaf
commit accf596bd7
11 changed files with 26 additions and 33 deletions

View File

@@ -21,12 +21,11 @@ setup('authenticate', async ({ page }) => {
await page.getByRole('button', { name: 'Parent login' }).click()
// Fill in the PIN and submit
const pinInput = page.getByLabel('PIN').or(page.getByPlaceholder('Enter PIN'))
const pinInput = page.getByPlaceholder('46 digits')
await pinInput.waitFor({ timeout: 5000 })
await page.screenshot({ path: 'auth-setup-before-pin.png' })
await pinInput.fill(E2E_PIN)
await page.screenshot({ path: 'auth-setup-after-pin.png' })
await page.getByRole('button', { name: 'Verify' }).click()
await page.getByLabel('Stay in parent mode on this device').check()
await page.getByRole('button', { name: 'OK' }).click()
// LoginButton does router.push('/parent') after PIN - wait for it
await page.waitForURL(/\/parent(\/|$)/)
@@ -36,7 +35,9 @@ setup('authenticate', async ({ page }) => {
await page.getByRole('button', { name: 'Add Child' }).waitFor({ timeout: 5000 })
} catch (e) {
await page.screenshot({ path: 'auth-setup-parent-fail.png' })
throw new Error('Parent mode not reached after PIN entry. See auth-setup-parent-fail.png for details.')
throw new Error(
'Parent mode not reached after PIN entry. See auth-setup-parent-fail.png for details.',
)
}
await page.context().storageState({ path: STORAGE_STATE })