This directory contains tests migrated from Cypress to Playwright.
auth/- Authentication and login tests (run without authenticated state)forms/- Form validation and data entry tests (run with authenticated state)
# Run all tests
npm test
# Run tests in UI mode
npx playwright test --ui
# Run specific test file
npx playwright test tests/forms/population.spec.ts
# Run tests in a specific browser
npx playwright test --project=chromium
# Show test report
npm run test-report- Locators: Cypress selectors (
cy.get()) → Playwright locators (page.locator()) - Auto-waiting: Playwright has better auto-waiting built-in
- Assertions:
should()→expect()withtoContainText(),toHaveValue(), etc. - Auth: Uses Playwright's
storageStatefor session persistence - Parallel execution: Tests run in parallel by default
// Cypress
cy.get('#input').clear().type('text').blur().should('have.value', 'text')
// Playwright
const input = page.locator('#input')
await input.clear()
await input.fill('text')
await input.blur()
await expect(input).toHaveValue('text')Migrated tests cover:
- ✅ User authentication
- ✅ Aktionsplan form
- ✅ Population form
- ✅ Teil-Population form
- ✅ Erfolgs-Kriterium form
- ✅ Feldkontrolle form
- ✅ Massnahme form
- ✅ Idealbiotop form
- ✅ Ziel form
- ✅ Projekt form
Additional forms from Cypress that could be migrated:
- AP-Bericht
- Beobachtung
- Freiwilligen-Kontrolle
- Massnahmen-Bericht
- Kontroll-Bericht
- And more...