feat: add enable/disable toggle for chore scheduling in ScheduleModal
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m39s

- Introduced a toggle button to enable or disable chores in the scheduler.
- The toggle will be available in both types of schedulers.
- Added UI design proposal and considerations for mobile dimensions.
- Included E2E tests to ensure toggle state persistence and correct behavior in child view.
This commit is contained in:
2026-03-20 16:42:13 -04:00
parent db6e0a7ce8
commit ef9cb01d92
45 changed files with 3543 additions and 232 deletions

View File

@@ -1,18 +1,11 @@
// spec: e2e/plans/user-profile.plan.md
import { test, expect } from '@playwright/test'
import { E2E_EMAIL, E2E_PASSWORD } from '../../e2e-constants'
const BACKEND = 'http://localhost:5000'
import { E2E_DELETE_EMAIL, E2E_DELETE_PASSWORD } from '../../e2e-constants'
test.describe('User Profile Delete Account', () => {
test.describe.configure({ mode: 'serial' })
test.afterAll(async ({ request }) => {
// Re-seed the e2e database to restore the test user for any subsequent test suites
await request.post(`${BACKEND}/auth/e2e-seed`)
})
test('Delete My Account opens confirmation dialog', async ({ page }) => {
await page.goto('/parent/profile')
@@ -46,7 +39,7 @@ test.describe('User Profile Delete Account', () => {
await page.getByRole('button', { name: 'Delete My Account' }).click()
await expect(page.locator('.modal-title', { hasText: 'Delete Your Account?' })).toBeVisible()
await page.locator('#confirmEmail').fill(E2E_EMAIL)
await page.locator('#confirmEmail').fill(E2E_DELETE_EMAIL)
await expect(
page.locator('.modal-dialog').getByRole('button', { name: 'Delete', exact: true }),
@@ -87,7 +80,7 @@ test.describe('User Profile Delete Account', () => {
await page.getByRole('button', { name: 'Delete My Account' }).click()
await expect(page.locator('.modal-title', { hasText: 'Delete Your Account?' })).toBeVisible()
await page.locator('#confirmEmail').fill(E2E_EMAIL)
await page.locator('#confirmEmail').fill(E2E_DELETE_EMAIL)
await page.locator('.modal-dialog').getByRole('button', { name: 'Delete', exact: true }).click()
// Confirmation modal appears
@@ -104,8 +97,8 @@ test.describe('User Profile Delete Account', () => {
test('Login after deletion is blocked with an appropriate error', async ({ page }) => {
await page.goto('/auth/login')
await page.getByLabel('Email address').fill(E2E_EMAIL)
await page.getByLabel('Password').fill(E2E_PASSWORD)
await page.getByLabel('Email address').fill(E2E_DELETE_EMAIL)
await page.getByLabel('Password').fill(E2E_DELETE_PASSWORD)
await page.getByRole('button', { name: 'Sign in' }).click()
// Login must fail with a deletion-related error message

View File

@@ -57,7 +57,10 @@ test.describe('User Profile editing', () => {
test('Back button navigates back', async ({ page }) => {
await page.goto('/parent')
await page.goto('/parent/profile')
// Navigate in-app via the profile dropdown so Vue Router has a real history entry.
await page.getByRole('button', { name: 'Parent menu' }).click()
await page.getByRole('menuitem', { name: 'Profile' }).click()
await expect(page).toHaveURL('/parent/profile')
await page.getByRole('button', { name: 'Cancel' }).click()