AdvancedPW-BKG-00440 minutesPlaywright

Create a booking by API and verify the directory

A fast test setup creates a harmless reservation through the session API before the browser verifies it.

  • api
  • api-ui
  • tables

Objective

What to automate

Create a booking with the Practice API and verify its guest name and rate in the booking directory.

Preconditions and test data

Preconditions

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

Test data

  • city: Pune
  • roomType: Park Queen
  • status: confirmed

Expected result

The returned bkg identifier and typed room fields appear only in the active session.

Progressive hints

Hint 1

Create a Lab session and retain its CSRF token.

Hint 2

POST all required booking fields plus room and rate metadata.

Hint 3

Open the app and locate the generated bkg row by guest name.

I’ve tried it — show solution
  1. Create a Lab session and retain its CSRF token.
  2. POST all required booking fields plus room and rate metadata.
  3. Open the app and locate the generated bkg row by guest name.

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