feat: update M2/M3 milestones to include testing infrastructure

M2 (Backend):
- Add tests/ folder with pytest test files
- Add pytest.ini for test configuration and coverage
- Update scoring to require unit tests (Score 4+)

M3 (Frontend):
- Add tests/ folder with Vitest component unit tests
- Add playwright/e2e/ folder with E2E Playwright tests
- Add @playwright/test dependency and configuration
- Update scoring to require both unit and E2E tests (Score 5)

README.md updated with all milestone links and test requirements
This commit is contained in:
Daniel Samson committed 2026-10-29 15:54:10 +00:00
1 parent d66fe178c3
commit 85490bc0a2
5 files changed
+216 -65

No files matched your search

+23 -8
View File
@@ -4,19 +4,19 @@
| Score | Criteria |
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0 | Agent failed to implement acceptance criteria:<br>- No Vite/React project created<br>- TypeScript not configured<br>- Project structure missing key folders<br>- Components incomplete<br>- Dockerfile or docker-compose missing |
| 1 | Agent partially implemented acceptance criteria that builds successfully:<br>- Basic React app with vite but no typescript<br>- Missing multiple required folders<br>- Components render but have errors<br>- npm scripts incomplete |
| 2 | Agent fully implemented acceptance criteria that builds successfully:<br>- Vite + React + TypeScript project in frontend/ folder<br>- All required directories (components/, pages/, types/, api/) created<br>- Article, Author, Category TypeScript interfaces defined<br>- Header and Home components created<br>- package.json scripts (dev, build, preview) working<br>- .gitignore excludes node_modules, dist/, IDE configs |
| 3 | Agent fully implemented acceptance criteria that builds successfully, includes properly configured API client with error handling<br>- Types exported for all interfaces match backend models<br>- ESLint configuration present and passing |
| 4 | Agent fully implemented acceptance criteria that builds successfully, includes comprehensive TypeScript types with validation<br>- Proper function signatures in API client<br- Components use TypeScript props with proper typing |
| 5 | Agent fully implemented acceptance criteria that builds successfully, includes all content from Score 4 AND:<br>- Full docker-compose.yml at project root with both backend and frontend services<br>- Production-ready Nginx configuration for serving React SPA<br>- Performance benchmarks showing acceptable build times |
| 0 | Agent failed to implement acceptance criteria:<br>- No Vite/React project created<br>- TypeScript not configured<br>- Project structure missing key folders<br>- Components incomplete<br>- Missing tests (unit + E2E)<br>- Dockerfile or docker-compose missing |
| 1 | Agent partially implemented acceptance criteria that builds successfully:<br>- Basic React app with vite but no typescript<br>- Missing multiple required folders<br>- Components render but have errors<br>- npm scripts incomplete<br>- No test setup at all |
| 2 | Agent fully implemented acceptance criteria that builds successfully:<br>- Vite + React + TypeScript project in frontend/ folder<br>- All required directories (components/, pages/, types/, api/, tests/) created<br>- Article, Author, Category TypeScript interfaces defined<br>- Header and Home components created<br>- package.json scripts (dev, build, preview, test, e2e) working<br>- .gitignore excludes node_modules, dist/, IDE configs<br>- Playwright installed and configured |
| 3 | Agent fully implemented acceptance criteria that builds successfully, includes properly configured API client with error handling<br>- Types exported for all interfaces match backend models<br>- ESLint configuration present and passing<br- Unit tests in src/tests/ using Vitest and React Testing Library |
| 4 | Agent fully implemented acceptance criteria that builds successfully, includes comprehensive unit tests covering:<br>- Header component rendering and props validation<br>- Home page loads and renders article layout<br>- API client error handling scenarios |
| 5 | Agent fully implemented acceptance criteria that builds successfully, includes all content from Score 4 AND:<br>- Playwright E2E tests in playwright/e2e/ passing successfully<br>- E2E tests verify homepage accessibility and API interactions<br>- Combined test coverage >60% across unit and E2E tests<br- Test scripts (npm run test, npm run e2e) execute without errors |
## Scoring Breakdown by Criterion
### Project Setup (Max 2 points)
- **0 pts**: No Vite/React project or not in frontend/ folder<br>- TypeScript missing entirely
- **1 pt**: Basic React app created but structure incomplete<br>- Missing api/, types/, pages/ folders
- **2 pts**: Complete directory structure with all required folders (public/, src/, components/, pages/, types/, api/)
- **2 pts**: Complete directory structure with all required folders (public/, src/, components/, pages/, types/, api/, tests/)
### TypeScript Implementation (Max 3 points)
- **0 pts**: No TypeScript or tsconfig.json<br>- Plain JavaScript only
@@ -35,6 +35,21 @@
- **1 pt**: Basic fetch wrapper exists but no error handling<br>- Missing type safety
- **2 pts**: api/client.ts with base URL configuration, fetch wrapper, and error handling<br>- Type-safe request/response functions
### Unit Testing (Max 4 points)
- **0 pts**: No Vitest or testing-library setup<br>- requirements.txt missing test dependencies
- **1 pt**: Tests folder exists but no actual tests<br>- Test runner not configured in package.json
- **2 pts**: Vitest configured, Header.test.tsx created<br- Basic component rendering tests
- **3 pts**: Multiple unit tests covering components and API client<br- Uses react-testing-library for DOM queries
- **4 pts**: Unit tests pass with >=50% coverage on tested components
### E2E Testing (Max 5 points)
- **0 pts**: No Playwright installed or configured<br>- playwright.config.ts missing
- **1 pt**: Playwright installed but no tests created<br>- npx playwright install not run
- **2 pts**: playwright/e2e folder created with home.spec.ts and api.spec.ts<br- Tests discoverable by npm run e2e
- **3 pts**: E2E tests verify homepage layout renders correctly<br- Basic accessibility checks pass
- **4 pts**: E2E tests verify API client makes requests and backend responds<br- Proper selectors and wait conditions used
- **5 pts**: All E2E tests pass successfully with comprehensive coverage of user flows
### Docker Configuration (Max 3 points)
- **0 pts**: No Dockerfile or .dockerignore<br>- Cannot containerize frontend
- **1 pt**: Basic Dockerfile but doesn't work<br>- Missing build steps or nginx config
@@ -51,7 +66,7 @@
- **1 pt**: README exists with basic info only<br>- Missing examples
- **2 pts**: Comprehensive README with setup guide, API documentation, and usage examples |
## Total Possible Score: 22 points
## Total Possible Score: 33 points
## Evaluation Notes
- Partial credit given for incomplete but working implementations (Score 1)