Playwright / Scenario
Boss Fight: The Hybrid Heist
Thirty-two dashboard tests, each doing UI signup, UI login, and fifteen UI clicks of data setup before one real assertion. Re-architect the suite around the request fixture.
- Difficulty
- Boss
- Format
- Scenario
- Points
- 300
- Estimate
- 20 min
// MISSION BRIEF
Your Mission
You inherit the dashboard suite: 26 minutes of CI, and the flake leaderboard is topped by the signup form, which is not even what these tests test. Every test builds its world by clicking.
This is the boss fight: redesign the suite as a hybrid, API for state, UI for behavior, without losing the coverage that matters. Decisions carry heavy weights, and partial credit is scarce.
// FIRST CONTACT
Battle teaser
First artifact
dashboard.spec.ts (the pattern, repeated 32 times)
The architectural principle this suite violates:
- AUI tests should not assert on text content
- BSet up state at API speed, verify behavior at UI speed: the browser should be reserved for the behavior under test (the dashboard), not for manufacturing preconditions
- CNever use beforeEach; setup belongs inside each test body
- DDashboards should be tested only with unit tests
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
playwrightapi-testinghybrid-testingtest-architecture