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
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:
@@ -1,5 +1,10 @@
|
||||
import { defineConfig, devices } from '@playwright/test'
|
||||
import { STORAGE_STATE, STORAGE_STATE_NO_PIN } from './e2e/e2e-constants'
|
||||
import {
|
||||
STORAGE_STATE,
|
||||
STORAGE_STATE_NO_PIN,
|
||||
STORAGE_STATE_DELETE,
|
||||
STORAGE_STATE_CC,
|
||||
} from './e2e/e2e-constants'
|
||||
|
||||
/**
|
||||
* Read environment variables from file.
|
||||
@@ -38,6 +43,9 @@ export default defineConfig({
|
||||
projects: [
|
||||
{ name: 'setup', testMatch: /auth\.setup\.ts/ },
|
||||
{ name: 'setup-no-pin', testMatch: /auth-no-pin\.setup\.ts/ },
|
||||
// Depends on 'setup' because e2e-seed (run in setup) truncates all users first.
|
||||
{ name: 'setup-delete', testMatch: /auth-delete\.setup\.ts/, dependencies: ['setup'] },
|
||||
{ name: 'setup-cc', testMatch: /auth-cc\.setup\.ts/, dependencies: ['setup'] },
|
||||
|
||||
{
|
||||
// Bucket A: child-options tests — run before create-child so that
|
||||
@@ -50,12 +58,12 @@ export default defineConfig({
|
||||
},
|
||||
|
||||
{
|
||||
// Bucket B: create-child tests — depends on chromium-child-options so it
|
||||
// starts only after all child-options tests have finished and cleaned up.
|
||||
// This guarantees deleteAllChildren() runs in a quiet window.
|
||||
// Bucket B: create-child tests — uses its own isolated user (e2e-cc@test.com)
|
||||
// so deleteAllChildren() only affects that user's children and never interferes
|
||||
// with concurrent buckets using the main E2E user.
|
||||
name: 'chromium-create-child',
|
||||
use: { ...devices['Desktop Chrome'], storageState: STORAGE_STATE },
|
||||
dependencies: ['setup', 'chromium-child-options'],
|
||||
use: { ...devices['Desktop Chrome'], storageState: STORAGE_STATE_CC },
|
||||
dependencies: ['setup-cc'],
|
||||
testMatch: [/mode_parent\/create-child\/.+\.spec\.ts/],
|
||||
},
|
||||
|
||||
@@ -64,6 +72,8 @@ export default defineConfig({
|
||||
// fullyParallel:false prevents files from being split across workers;
|
||||
// the merged kindness-default and penalty-default files use mode:'serial'
|
||||
// internally to guarantee the convert and delete tests never run in parallel.
|
||||
// API-based beforeEach cleanup in each spec makes these tests resilient to
|
||||
// concurrent SSE activity from other buckets.
|
||||
name: 'chromium-default-tasks',
|
||||
use: { ...devices['Desktop Chrome'], storageState: STORAGE_STATE },
|
||||
dependencies: ['setup'],
|
||||
@@ -98,6 +108,14 @@ export default defineConfig({
|
||||
testMatch: [/mode_parent\/task-modification\/.+\.spec\.ts/],
|
||||
},
|
||||
|
||||
{
|
||||
// Bucket: chore scheduler tests — each spec creates isolated child+chores.
|
||||
name: 'chromium-chore-scheduler',
|
||||
use: { ...devices['Desktop Chrome'], storageState: STORAGE_STATE },
|
||||
dependencies: ['setup'],
|
||||
testMatch: [/mode_parent\/chore-scheduler\/.+\.spec\.ts/],
|
||||
},
|
||||
|
||||
{
|
||||
// Bucket: parent profile button tests (permanent parent mode).
|
||||
name: 'chromium-profile-button',
|
||||
@@ -123,10 +141,11 @@ export default defineConfig({
|
||||
},
|
||||
|
||||
{
|
||||
// Bucket: delete account tests — MUST run last; re-seeds the DB in afterAll.
|
||||
// Bucket: delete account tests — uses its own isolated user (e2e-delete@test.com)
|
||||
// so the shared E2E session is never affected and no cross-project dependencies needed.
|
||||
name: 'chromium-user-profile-delete',
|
||||
use: { ...devices['Desktop Chrome'], storageState: STORAGE_STATE },
|
||||
dependencies: ['setup'],
|
||||
use: { ...devices['Desktop Chrome'], storageState: STORAGE_STATE_DELETE },
|
||||
dependencies: ['setup-delete'],
|
||||
testMatch: [/mode_parent\/user-profile\/delete-account\.spec\.ts/],
|
||||
},
|
||||
|
||||
@@ -143,6 +162,7 @@ export default defineConfig({
|
||||
/mode_parent\/task-modification\//,
|
||||
/mode_parent\/profile-button\//,
|
||||
/mode_parent\/user-profile\//,
|
||||
/mode_parent\/chore-scheduler\//,
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user