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 }) })