IntermediatePW-MOCK-00225 minutesPlaywright

Fulfil an empty catalogue contract

A valid route fulfilment can legitimately return no matching synthetic products.

  • network-mocking
  • assertions

Objective

What to automate

Fulfil the documented request with HTTP 200 and data: [], then assert the empty response message.

Preconditions and test data

Preconditions

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

Test data

  • status: 200
  • body: {"data": []}

Expected result

The response table exposes EMPTY_ARRAY and the visible status reports 200 OK with zero items.

Progressive hints

Hint 1

Keep the response JSON valid even when it has no rows.

Hint 2

Use the documented data property instead of changing the endpoint.

Hint 3

Assert the EMPTY_ARRAY message in the response table.

I’ve tried it — show solution
  1. Keep the response JSON valid even when it has no rows.
  2. Use the documented data property instead of changing the endpoint.
  3. Assert the EMPTY_ARRAY message in the response table.

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