diff --git a/.sisyphus/plans/cts-herd-playwright.md b/.sisyphus/plans/cts-herd-playwright.md index c5d36e7..b64989f 100644 --- a/.sisyphus/plans/cts-herd-playwright.md +++ b/.sisyphus/plans/cts-herd-playwright.md @@ -235,10 +235,10 @@ ### Wave 1 — Environment + Foundation - `.env.example` is the only file that needs editing — update APP_URL and CHURCHTOOLS_REDIRECT_URI to match Herd's URL scheme **Acceptance Criteria**: - - [ ] `.env.example` has `APP_URL=http://cts-work.test` - - [ ] `.env.example` has `CHURCHTOOLS_REDIRECT_URI=http://cts-work.test/auth/churchtools/callback` - - [ ] `npm run build` exits with code 0 - - [ ] `php artisan migrate` exits with code 0 + - [x] `.env.example` has `APP_URL=http://cts-work.test` + - [x] `.env.example` has `CHURCHTOOLS_REDIRECT_URI=http://cts-work.test/auth/churchtools/callback` + - [x] `npm run build` exits with code 0 + - [x] `php artisan migrate` exits with code 0 **QA Scenarios:** @@ -319,11 +319,11 @@ ### Wave 1 — Environment + Foundation - `Login.vue`: Small component, add button conditionally based on prop **Acceptance Criteria**: - - [ ] `POST /dev-login` route exists and is gated by `app()->environment('local', 'testing')` - - [ ] Route creates/finds user with email `test@local.dev` and logs in via `Auth::login()` - - [ ] Login page shows "Test Login" button when `APP_ENV=local` - - [ ] Clicking button logs in and redirects to dashboard - - [ ] Button is NOT visible when `APP_ENV=production` + - [x] `POST /dev-login` route exists and is gated by `app()->environment('local', 'testing')` + - [x] Route creates/finds user with email `test@local.dev` and logs in via `Auth::login()` + - [x] Login page shows "Test Login" button when `APP_ENV=local` + - [x] Clicking button logs in and redirects to dashboard + - [x] Button is NOT visible when `APP_ENV=production` **QA Scenarios:** @@ -396,8 +396,8 @@ ### Wave 1 — Environment + Foundation - OAuth callback pattern shows realistic values to mimic in factory **Acceptance Criteria**: - - [ ] UserFactory includes `churchtools_id`, `avatar`, `churchtools_groups`, `churchtools_roles` - - [ ] `php artisan test` still passes — 174 tests, 905 assertions, 0 failures + - [x] UserFactory includes `churchtools_id`, `avatar`, `churchtools_groups`, `churchtools_roles` + - [x] `php artisan test` still passes — 174 tests, 905 assertions, 0 failures **QA Scenarios:** @@ -502,12 +502,12 @@ ### Wave 2 — Test Infrastructure - Naming convention must be consistent for maintainability **Acceptance Criteria**: - - [ ] All 6 Page components have `data-testid` on all interactive elements - - [ ] All 4 Block components have `data-testid` on all interactive elements - - [ ] All 5 Feature components have `data-testid` on all interactive elements - - [ ] All 3 Layout components have `data-testid` on key navigation elements - - [ ] `npm run build` succeeds (no broken templates) - - [ ] `php artisan test` still passes (174 tests) + - [x] All 6 Page components have `data-testid` on all interactive elements + - [x] All 4 Block components have `data-testid` on all interactive elements + - [x] All 5 Feature components have `data-testid` on all interactive elements + - [x] All 3 Layout components have `data-testid` on key navigation elements + - [x] `npm run build` succeeds (no broken templates) + - [x] `php artisan test` still passes (174 tests) **QA Scenarios:** @@ -603,11 +603,11 @@ ### Wave 2 — Test Infrastructure - `workers: 1` is critical for SQLite — parallel workers cause SQLITE_BUSY **Acceptance Criteria**: - - [ ] `@playwright/test` in devDependencies - - [ ] `playwright.config.ts` exists with `baseURL`, `workers: 1`, no `webServer` - - [ ] `tests/e2e/auth.setup.ts` exists and performs dummy login - - [ ] `npx playwright test --project=setup` passes (auth state saved) - - [ ] `tests/e2e/.auth/user.json` exists after setup runs + - [x] `@playwright/test` in devDependencies + - [x] `playwright.config.ts` exists with `baseURL`, `workers: 1`, no `webServer` + - [x] `tests/e2e/auth.setup.ts` exists and performs dummy login + - [x] `npx playwright test --project=setup` passes (auth state saved) + - [x] `tests/e2e/.auth/user.json` exists after setup runs **QA Scenarios:** @@ -687,8 +687,8 @@ ### Wave 3 — E2E Tests (Core Features) - Routes: Know which routes require auth for redirect testing **Acceptance Criteria**: - - [ ] `tests/e2e/auth.spec.ts` exists with ≥ 4 tests - - [ ] `npx playwright test auth.spec.ts` → all pass + - [x] `tests/e2e/auth.spec.ts` exists with ≥ 4 tests + - [x] `npx playwright test auth.spec.ts` → all pass **QA Scenarios:** @@ -749,8 +749,8 @@ ### Wave 3 — E2E Tests (Core Features) - Dashboard: Know what heading/content to assert after login **Acceptance Criteria**: - - [ ] `tests/e2e/navigation.spec.ts` exists with ≥ 4 tests - - [ ] `npx playwright test navigation.spec.ts` → all pass + - [x] `tests/e2e/navigation.spec.ts` exists with ≥ 4 tests + - [x] `npx playwright test navigation.spec.ts` → all pass **QA Scenarios:** @@ -811,9 +811,9 @@ ### Wave 3 — E2E Tests (Core Features) - ServiceController: Understand data shape to know what structural elements to assert **Acceptance Criteria**: - - [ ] `tests/e2e/service-list.spec.ts` exists with ≥ 4 tests - - [ ] `npx playwright test service-list.spec.ts` → all pass - - [ ] Tests do NOT contain hardcoded CTS data values + - [x] `tests/e2e/service-list.spec.ts` exists with ≥ 4 tests + - [x] `npx playwright test service-list.spec.ts` → all pass + - [x] Tests do NOT contain hardcoded CTS data values **QA Scenarios:** @@ -877,8 +877,8 @@ ### Wave 3 — E2E Tests (Core Features) - SlideUploader/SlideGrid: Specific interactive elements (drop zone, thumbnails, delete, datepicker) **Acceptance Criteria**: - - [ ] `tests/e2e/service-edit-information.spec.ts` exists with ≥ 3 tests - - [ ] `npx playwright test service-edit-information.spec.ts` → all pass + - [x] `tests/e2e/service-edit-information.spec.ts` exists with ≥ 3 tests + - [x] `npx playwright test service-edit-information.spec.ts` → all pass **QA Scenarios:** @@ -930,8 +930,8 @@ ### Wave 3 — E2E Tests (Core Features) - `/Users/thorsten/AI/cts-work/resources/js/Pages/Services/Edit.vue` — Accordion structure (Moderation is second block). **Acceptance Criteria**: - - [ ] `tests/e2e/service-edit-moderation.spec.ts` exists with ≥ 3 tests - - [ ] `npx playwright test service-edit-moderation.spec.ts` → all pass + - [x] `tests/e2e/service-edit-moderation.spec.ts` exists with ≥ 3 tests + - [x] `npx playwright test service-edit-moderation.spec.ts` → all pass **QA Scenarios:** @@ -980,8 +980,8 @@ ### Wave 3 — E2E Tests (Core Features) - `/Users/thorsten/AI/cts-work/resources/js/Pages/Services/Edit.vue` — Accordion structure (Sermon is third block). **Acceptance Criteria**: - - [ ] `tests/e2e/service-edit-sermon.spec.ts` exists with ≥ 3 tests - - [ ] `npx playwright test service-edit-sermon.spec.ts` → all pass + - [x] `tests/e2e/service-edit-sermon.spec.ts` exists with ≥ 3 tests + - [x] `npx playwright test service-edit-sermon.spec.ts` → all pass **QA Scenarios:** @@ -1049,9 +1049,9 @@ ### Wave 3 — E2E Tests (Core Features) - SongPreviewModal: Verify it opens on button click (detailed content testing in T18) **Acceptance Criteria**: - - [ ] `tests/e2e/service-edit-songs.spec.ts` exists with ≥ 6 tests - - [ ] `npx playwright test service-edit-songs.spec.ts` → all pass - - [ ] Tests do NOT contain hardcoded song names or CTS data + - [x] `tests/e2e/service-edit-songs.spec.ts` exists with ≥ 6 tests + - [x] `npx playwright test service-edit-songs.spec.ts` → all pass + - [x] Tests do NOT contain hardcoded song names or CTS data **QA Scenarios:** @@ -1110,9 +1110,9 @@ ### Wave 3 — E2E Tests (Core Features) - ConfirmDialog: Need testid for confirm/cancel buttons **Acceptance Criteria**: - - [ ] `tests/e2e/service-finalization.spec.ts` exists with ≥ 3 tests - - [ ] `npx playwright test service-finalization.spec.ts` → all pass - - [ ] Tests restore service state (reopen after finalize) + - [x] `tests/e2e/service-finalization.spec.ts` exists with ≥ 3 tests + - [x] `npx playwright test service-finalization.spec.ts` → all pass + - [x] Tests restore service state (reopen after finalize) **QA Scenarios:** @@ -1171,8 +1171,8 @@ ### Wave 4 — E2E Tests (Song DB + Advanced Features) - `/Users/thorsten/AI/cts-work/app/Http/Controllers/SongController.php` — Song CRUD controller. **Acceptance Criteria**: - - [ ] `tests/e2e/song-db.spec.ts` exists with ≥ 5 tests - - [ ] `npx playwright test song-db.spec.ts` → all pass + - [x] `tests/e2e/song-db.spec.ts` exists with ≥ 5 tests + - [x] `npx playwright test song-db.spec.ts` → all pass **QA Scenarios:** @@ -1224,8 +1224,8 @@ ### Wave 4 — E2E Tests (Song DB + Advanced Features) - `/Users/thorsten/AI/cts-work/resources/js/Pages/Songs/Index.vue` — Parent page where Edit button triggers modal. **Acceptance Criteria**: - - [ ] `tests/e2e/song-edit-modal.spec.ts` exists with ≥ 3 tests - - [ ] `npx playwright test song-edit-modal.spec.ts` → all pass + - [x] `tests/e2e/song-edit-modal.spec.ts` exists with ≥ 3 tests + - [x] `npx playwright test song-edit-modal.spec.ts` → all pass **QA Scenarios:** @@ -1279,8 +1279,8 @@ ### Wave 4 — E2E Tests (Song DB + Advanced Features) - `/Users/thorsten/AI/cts-work/app/Http/Controllers/TranslationController.php` — Translation controller with `page()`, `import()`, `fetchUrl()` methods. **Acceptance Criteria**: - - [ ] `tests/e2e/song-translate.spec.ts` exists with ≥ 3 tests - - [ ] `npx playwright test song-translate.spec.ts` → all pass + - [x] `tests/e2e/song-translate.spec.ts` exists with ≥ 3 tests + - [x] `npx playwright test song-translate.spec.ts` → all pass **QA Scenarios:** @@ -1347,9 +1347,9 @@ ### Wave 4 — E2E Tests (Song DB + Advanced Features) - SongEditModal: Entry point to reach the configurator **Acceptance Criteria**: - - [ ] `tests/e2e/arrangement.spec.ts` exists with ≥ 4 tests - - [ ] `npx playwright test arrangement.spec.ts` → all pass - - [ ] No leftover test arrangements in DB after test run + - [x] `tests/e2e/arrangement.spec.ts` exists with ≥ 4 tests + - [x] `npx playwright test arrangement.spec.ts` → all pass + - [x] No leftover test arrangements in DB after test run **QA Scenarios:** @@ -1400,8 +1400,8 @@ ### Wave 4 — E2E Tests (Song DB + Advanced Features) - `/Users/thorsten/AI/cts-work/app/Http/Controllers/SongPdfController.php` — PDF generation + preview JSON endpoints. **Acceptance Criteria**: - - [ ] `tests/e2e/song-preview-pdf.spec.ts` exists with ≥ 3 tests - - [ ] `npx playwright test song-preview-pdf.spec.ts` → all pass + - [x] `tests/e2e/song-preview-pdf.spec.ts` exists with ≥ 3 tests + - [x] `npx playwright test song-preview-pdf.spec.ts` → all pass **QA Scenarios:** @@ -1460,9 +1460,9 @@ ### Wave 4 — E2E Tests (Song DB + Advanced Features) - ProFileController: Verify 501 responses for upload/download **Acceptance Criteria**: - - [ ] `tests/e2e/sync-and-pro.spec.ts` exists with ≥ 4 tests - - [ ] `npx playwright test sync-and-pro.spec.ts` → all pass - - [ ] Tests verify .pro endpoints return 501 + - [x] `tests/e2e/sync-and-pro.spec.ts` exists with ≥ 4 tests + - [x] `npx playwright test sync-and-pro.spec.ts` → all pass + - [x] Tests verify .pro endpoints return 501 **QA Scenarios:** @@ -1526,10 +1526,10 @@ ### Wave 4 — E2E Tests (Song DB + Advanced Features) - Auth setup: Common failure point if storageState is stale **Acceptance Criteria**: - - [ ] `npx playwright test` → ALL tests pass, 0 failures - - [ ] `php artisan test` → 174 tests, 905 assertions, 0 failures - - [ ] `npm run build` → exit code 0 - - [ ] Test count documented in evidence file + - [x] `npx playwright test` → ALL tests pass, 0 failures + - [x] `php artisan test` → 174 tests, 905 assertions, 0 failures + - [x] `npm run build` → exit code 0 + - [x] Test count documented in evidence file **QA Scenarios:**