// 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 await expect( page.locator('text=Fighting >> .. >> button[aria-label="Delete item"]'), ).toBeVisible() })