AdvancedPW-NET-00240 minutesPlaywright

Modify a product response

A UI assertion needs a controlled server response while preserving the real schema.

  • network-mocking
  • api

Objective

What to automate

Fetch the real catalogue response, rename one product, and fulfil the request.

Preconditions and test data

Preconditions

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

Test data

  • replacement name: Mocked QA Laptop

Expected result

The modified name is rendered and the server seed remains unchanged.

Progressive hints

Hint 1

Use route.fetch for the original response.

Hint 2

Change one object without removing required fields.

Hint 3

Fulfil with the modified JSON, then query the API separately to prove isolation.

I’ve tried it — show solution
  1. Use route.fetch for the original response.
  2. Change one object without removing required fields.
  3. Fulfil with the modified JSON, then query the API separately to prove isolation.