Phase 09: CI Pipeline Hardening - 4 plan(s) in 3 wave(s) - Wave 1: Infrastructure setup (09-01) - Wave 2: Tests in parallel (09-02, 09-03) - Wave 3: CI integration (09-04) - Ready for execution Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7.1 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | must_haves | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 09-ci-pipeline | 03 | execute | 2 |
|
|
true |
|
Purpose: Establish E2E tests that verify full user journeys work correctly. These tests catch integration issues that unit tests miss and provide confidence that the deployed application works as expected.
Output: E2E test suite covering core user workflows, database seeding fixture for consistent test data, multi-viewport testing for desktop and mobile.
<execution_context> @/home/tho/.claude/get-shit-done/workflows/execute-plan.md @/home/tho/.claude/get-shit-done/templates/summary.md </execution_context>
@.planning/PROJECT.md @.planning/phases/09-ci-pipeline/09-RESEARCH.md @.planning/phases/09-ci-pipeline/09-01-SUMMARY.md@playwright.config.ts @tests/docker-deployment.spec.ts @src/lib/server/db/schema.ts @src/routes/+page.svelte
Task 1: Update Playwright configuration for E2E requirements playwright.config.ts Update playwright.config.ts with E2E requirements from user decisions:-
Set
testDir: './tests/e2e'(separate from existing docker test) -
Set
fullyParallel: false(shared database) -
Set
workers: 1(avoid database race conditions) -
Configure
reporter:['html', { open: 'never' }]['github']for CI annotations
-
Configure
use:baseURL: process.env.BASE_URL || 'http://localhost:5173'trace: 'on-first-retry'screenshot: 'only-on-failure'(per user decision: screenshots, no video)video: 'off'
-
Add two projects:
chromium-desktop: usingdevices['Desktop Chrome']chromium-mobile: usingdevices['Pixel 5']
-
Configure
webServer:command: 'npm run build && npm run preview'port: 4173reuseExistingServer: !process.env.CI
Move existing docker-deployment.spec.ts to tests/e2e/ or keep in tests/ with separate config.
Run npx playwright test --list - shows test files found
Configuration is valid (no syntax errors)
Playwright configured for E2E with desktop/mobile viewports, screenshots on failure, single worker for database safety.
Create tests/e2e/fixtures/db.ts:
- Import test base from @playwright/test
- Import db from src/lib/server/db
- Import schema from src/lib/server/db/schema
- Import seed and reset from drizzle-seed
Create a fixture that:
- Seeds database with known test data before test
- Provides seeded entries (tasks, thoughts) with predictable IDs and content
- Cleans up after test using reset()
Create tests/e2e/index.ts:
- Re-export extended test with seededDb fixture
- Re-export expect from @playwright/test
Test data should include:
- At least 5 entries with various states (tasks vs thoughts, completed vs pending)
- Entries with tags for testing filter/search
- Entries with images (if applicable to schema)
- Entries with different dates for sorting tests
Note: Read the actual schema.ts to understand the exact model structure before writing seed logic. TypeScript compiles without errors Fixture can be imported in test file Database fixture created. Tests can import { test, expect } from './fixtures' to get seeded database.
Task 3: Write E2E tests for core user journeys tests/e2e/user-journeys.spec.ts Create tests/e2e/user-journeys.spec.ts using the custom test with fixtures:import { test, expect } from './index';
Write tests for each user journey (per CONTEXT.md decisions):
Create workflow:
- Navigate to home page
- Use quick capture to create a new entry
- Verify entry appears in list
- Verify entry persists after page reload
Edit workflow:
- Find an existing entry (from seeded data)
- Click to open/edit
- Modify content
- Save changes
- Verify changes persisted
Search workflow:
- Use search bar to find entry by text
- Verify matching entries shown
- Verify non-matching entries hidden
- Test search with tags filter
Organize workflow:
- Add tag to entry
- Filter by tag
- Verify filtered results
- Pin an entry (if applicable)
- Verify pinned entry appears first
Delete workflow:
- Select an entry
- Delete it
- Verify entry removed from list
- Verify entry not found after reload
Use test.describe() to group related tests.
Each test should use seededDb fixture for consistent starting state.
Use page object pattern if tests get complex (optional - can keep simple for now).
Run npm run test:e2e with app running locally (or let webServer start it)
All E2E tests pass
Screenshots are generated in test-results/ for any failures
E2E test suite covers all core user journeys. Tests run on both desktop and mobile viewports.
<success_criteria>
- CI-04 requirement satisfied: E2E tests ready for pipeline
- User journeys cover create/edit/search/organize/delete as specified in CONTEXT.md
- Multi-viewport testing (desktop + mobile) per CONTEXT.md decision
- Database fixtures provide consistent, isolated test data
- Screenshot on failure configured (no video per CONTEXT.md decision) </success_criteria>