Files
chore/frontend/vue-app/e2e/mode_parent/tasks/penalty-convert-default.spec.ts
Ryan Kegel c2b022eb0b
Some checks failed
Chore App Build, Test, and Push Docker Images / build-and-push (push) Has been cancelled
Refactor Playwright tests and update configurations
- Consolidated kindness and penalty tests into single files to ensure serial execution and prevent conflicts.
- Updated Playwright configuration to define separate test buckets for child options and create child tests, ensuring proper execution order.
- Added new tests for child kebab menu options including editing, deleting points, and confirming child deletion.
- Removed obsolete tests for kindness and penalty default management.
- Updated authentication tokens in user.json for improved security.
- Enhanced test reliability by implementing retry logic for UI interactions in the create-child happy path test.
2026-03-13 23:26:27 -04:00

28 lines
1.0 KiB
TypeScript

// spec: frontend/vue-app/e2e/plans/parent-item-management.plan.md
// seed: e2e/seed.spec.ts
import { test, expect } from '@playwright/test'
test('Convert a default penalty to a user item by editing', async ({ page }) => {
await page.goto('/parent/tasks/chores')
await page.click('text=Penalties')
// locate default penalty
await expect(page.locator('text=Fighting')).toBeVisible()
await expect(page.locator('text=Fighting >> .. >> button[aria-label="Delete item"]')).toHaveCount(
0,
)
// edit it (click the item itself)
await page.getByText('Fighting', { exact: true }).click()
await page.locator('#name').fill('Fighting (custom)')
await page.locator('#points').fill('15')
await expect(page.getByRole('button', { name: 'Save' })).toBeEnabled()
await page.getByRole('button', { name: 'Save' }).click()
// now should have delete option (match the updated name exactly)
await expect(
page
.getByText('Fighting (custom)', { exact: true })
.locator('..')
.locator('button[aria-label="Delete item"]'),
).toBeVisible()
})