Comprehensive testing workflow for E2E, integration, and unit tests. Use when testing applications layer-by-layer, validating user journeys, or running test suites.
Guide comprehensive testing following the layer-by-layer approach. Test systematically from database → backend → frontend → E2E.
DON'T: Test entire system at once DO: Test each layer independently, bottom-up
Layer 1: Database ✅ → SQL queries
Layer 2: Backend ✅ → API/Edge Functions
Layer 3: Frontend 🟡 → Component testing
Layer 4: E2E 🔴 → Complete user journeys
Test SQL, RLS policies, migrations
Test Edge Functions, APIs
Test components, UI
Test complete user journeys
pnpm tsc && pnpm build
pnpm tsc && pnpm build && npx playwright test
npx playwright test --ui
| Layer | What | Tools | Time |
|---|---|---|---|
| 1. Database | SQL, RLS | Supabase, psql | 2 min |
| 2. Backend | Edge Functions | curl, Supabase CLI | 3 min |
| 3. Frontend | Components | TypeScript, Build | 2 min |
| 4. E2E | User journeys | Playwright | 5 min |
# 1. Type check
pnpm tsc --noEmit
# 2. Build
pnpm build
# 3. Start dev server (background)
pnpm dev &
# 4. Manual smoke test
# - Visit /pitch-deck-wizard
# - Send message
# - Verify response
# 5. Run E2E tests
npx playwright test
# 6. Check production build
pnpm preview
pnpm tsc --noEmit → 0 errorspnpm lint → 0 warningspnpm build → succeedsconsole.log in production code-- Set test presentation public
UPDATE presentations
SET is_public = true
WHERE id = 'd4a27c1c-8b2d-48a9-99c9-2298037e9e81';
// Increase timeout
await page.waitForSelector('element', { timeout: 30000 });
# Find all errors
pnpm tsc --noEmit | grep "error TS"
lovable-plan/management/903-DAILY-TESTING-CHECKLIST.mdlovable-plan/docs/004-TESTING-STRATEGY-AND-IMPROVEMENTS.mdStart testing: Begin with DATABASE.md for Layer 1