feat: Implement user profile and parent profile button tests
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m38s

- Added tests for user profile editing, including name changes, image uploads, and password changes.
- Implemented tests for changing the parent PIN with verification code handling.
- Created tests for account deletion with confirmation dialog and email validation.
- Introduced parent profile button tests for both temporary and permanent modes, verifying badge visibility and menu options.
- Updated Playwright configuration to include new test buckets for user profile and parent profile button scenarios.
- Added e2e plans documentation for user profile and parent profile button tests.
This commit is contained in:
2026-03-18 17:20:31 -04:00
parent a9131242a7
commit db6e0a7ce8
15 changed files with 998 additions and 21 deletions

View File

@@ -37,23 +37,13 @@ test.describe('Convert default reward', () => {
await expect(page.locator('input#name')).toHaveValue('Choose meal')
// change fields
await page.evaluate(() => {
const setVal = (sel: string, val: string) => {
const el = document.querySelector(sel) as HTMLInputElement | null
if (el) {
el.value = val
el.dispatchEvent(new Event('input', { bubbles: true }))
el.dispatchEvent(new Event('change', { bubbles: true }))
}
}
setVal('#name', 'Choose meal (custom)')
setVal('#cost', '35')
})
await page.locator('#name').fill('Choose meal (custom)')
await page.locator('#cost').fill('35')
await expect(page.getByRole('button', { name: 'Save' })).toBeEnabled()
await page.click('button:has-text("Save")')
await page.getByRole('button', { name: 'Save' }).click()
// after save, ensure row now has delete control
const updated = page.locator('text=Choose meal (custom)').first()
const updated = page.getByText('Choose meal (custom)', { exact: true }).first()
await expect(updated).toBeVisible()
await expect(updated.locator('..').getByRole('button', { name: 'Delete' })).toBeVisible()
})