BeginnerPW-VIS-00115 minutesPlaywright

Capture the frozen v1 baseline

A release-review surface must be captured only after its deterministic inputs are ready.

  • visual-testing
  • assertions
  • screenshots

Objective

What to automate

Open v1, wait for local fonts, and capture the reviewed desktop baseline.

Preconditions and test data

Preconditions

  • Use a fresh isolated Practice Lab browser context.
  • Open the fixture identified by FX-VIS-001.

Test data

  • route: /visual-testing/v1/
  • viewport: 1440x1000

Expected result

The reviewed v1 desktop screenshot represents the purple approved five-check state.

Progressive hints

Hint 1

Navigate to the named v1 route.

Hint 2

Wait for document.fonts.ready before capture.

Hint 3

Use a full-page screenshot with animations disabled.

I’ve tried it — show solution
  1. Navigate to the named v1 route.
  2. Wait for document.fonts.ready before capture.
  3. Use a full-page screenshot with animations disabled.

The deliberately failing starter is in tests/visual-testing.spec.ts inside the TypeScript starter ZIP.