| name | testing-workflow |
| description | Comprehensive testing workflow for E2E, integration, and unit tests. Use when testing applications layer-by-layer, validating user journeys, or running test suites. |
| version | 1.0.0 |
Testing Workflow Skill
Purpose
Guide comprehensive testing following the layer-by-layer approach. Test systematically from database → backend → frontend → E2E.
Testing Philosophy
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
Quick Navigation
🗄️ Layer 1: Database
Test SQL, RLS policies, migrations
- See DATABASE.md
- Quick SQL tests, RLS verification, policy checks
⚙️ Layer 2: Backend
Test Edge Functions, APIs
🎨 Layer 3: Frontend
Test components, UI
🚀 Layer 4: E2E
Test complete user journeys
- See E2E.md
- Playwright tests, full workflows
Quick Test Commands
Pre-Commit Check (30 sec)
pnpm tsc && pnpm build
Full Test Suite (5 min)
pnpm tsc && pnpm build && npx playwright test
Watch Mode
npx playwright test --ui
Testing Layers
| 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 |
Pre-Deployment Testing
Complete Test Run (15 min)
pnpm tsc --noEmit
pnpm build
pnpm dev &
npx playwright test
pnpm preview
Production Readiness Checklist
Code Quality
Functionality
Backend
Testing
Common Issues
Tests Fail Due to RLS
UPDATE presentations
SET is_public = true
WHERE id = 'd4a27c1c-8b2d-48a9-99c9-2298037e9e81';
Playwright Timeout
await page.waitForSelector('element', { timeout: 30000 });
TypeScript Errors
pnpm tsc --noEmit | grep "error TS"
Resources
- Daily Checklist:
lovable-plan/management/903-DAILY-TESTING-CHECKLIST.md
- Full Strategy:
lovable-plan/docs/004-TESTING-STRATEGY-AND-IMPROVEMENTS.md
- Playwright Docs: https://playwright.dev
Start testing: Begin with DATABASE.md for Layer 1