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
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:
@@ -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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user