Add end-to-end tests for parent notifications and actions
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m35s

- Implement tests for approving and denying rewards and chores, including token generation and validation.
- Create tests for error handling scenarios with expired, tampered, and fake tokens.
- Add tests for push subscription registration and user profile notification settings.
- Ensure that notifications reflect the correct state of rewards and chores in the UI.
- Validate that toggles for email digest and push notifications function correctly based on user permissions and server state.
This commit is contained in:
2026-04-20 20:32:19 -04:00
parent ee16b49020
commit 4ee5367742
22 changed files with 1814 additions and 67 deletions

View File

@@ -116,6 +116,16 @@ export default defineConfig({
testMatch: [/mode_parent\/chore-scheduler\/.+\.spec\.ts/],
},
{
// Bucket: parent notifications tests — push subscription, chore/reward
// notification approval/denial, deep-link navigation, digest tokens, and
// user profile notification settings. Each spec creates its own isolated child.
name: 'chromium-parent-notifications',
use: { ...devices['Desktop Chrome'], storageState: STORAGE_STATE },
dependencies: ['setup'],
testMatch: [/mode_parent\/notifications\/.+\.spec\.ts/],
},
{
// Bucket: parent profile button tests (permanent parent mode).
name: 'chromium-profile-button',
@@ -163,6 +173,7 @@ export default defineConfig({
/mode_parent\/profile-button\//,
/mode_parent\/user-profile\//,
/mode_parent\/chore-scheduler\//,
/mode_parent\/notifications\//,
],
},
@@ -232,6 +243,10 @@ export default defineConfig({
DATA_ENV: 'e2e',
SECRET_KEY: 'dev-secret-key-change-in-production',
REFRESH_TOKEN_EXPIRY_DAYS: '90',
DIGEST_TOKEN_SECRET: 'dev-digest-token',
VAPID_PUBLIC_KEY:
'BNKkHdq45uLigohSG7c1TwlAo7ETncoRVLQK02LxHgu2P1DgSJD9njRMfbbzUsaTQGllvLBz7An1WiWsNYQhvKE',
VAPID_PRIVATE_KEY: 'jNiZJT0UO4H861KmnCt874Fg6p5jDAyYKS4V2MZf8bQ',
PROCESS_PLATFORM: process.platform,
},
},