Exercise: happy-path E2E (Playwright)
Goal
Write a stable Playwright test for a simple user journey in the app.
Scenario
Pick one exercise page/feature (e.g. “Users” or “Teams”) and automate:
- open the page
- create an item
- verify it shows in the list
- verify a visible success state
Acceptance criteria (entry)
- Uses resilient selectors (role/text/testid).
- Does not depend on timing sleeps (
waitForTimeout) except as a last resort. - Produces a clear failure message when it fails.
Stretch goals (mid)
- Add a second test for an error path (e.g. validation error or simulated server error).
- Add a fixture that resets state between tests.
Stretch goals (senior)
- Propose CI stability rules (retries, traces/screenshots on failure).
- Define what belongs in E2E vs unit/integration tests for this feature.
Last updated on