-
Notifications
You must be signed in to change notification settings - Fork 2
Testing
Yinan Zhou edited this page Dec 8, 2025
·
1 revision
This project includes both unit tests and end-to-end tests. Unit tests are implemented using Vitest, while end-to-end tests use Playwright. Pytest will be implemented in the future for backend testing.
Framework: Vitest with happy-dom environment
Location: web-app/frontend/src/**/*.test.ts
Configuration: web-app/frontend/vitest.config.ts
Run locally:
cd web-app/frontend
npm test
# To run a specific test file/folder
npx vitest run src/path/to/your.test.tsFramework: Playwright
Location: web-app/frontend/tests/e2e/
Configuration: web-app/frontend/playwright.config.ts
Prerequisites: Docker Compose services must be running
Run locally:
# Start test environment
docker-compose -f docker-compose-test.yml up -d --build
# Run E2E tests
cd web-app/frontend
npm run test:e2e
# Or run a specific test file/folder
npx playwright test tests/e2e/path/to/your.spec.tsSetup: The E2E test setup (tests/setup/docker-setup.ts) automatically:
- Waits for Django server to be ready
- Runs database migrations
- Creates test users
- Imports languages and instruments
- Indexes data in Solr