IntermediatePW-BKG-00525 minutesPlaywright

Cancel a booking through a labelled dialog

A cancellation flow must make its scope explicit and never affect a real reservation.

  • dialogs
  • forms
  • assertions

Objective

What to automate

Confirm a synthetic booking, open the cancellation dialog, and accept its cancel action.

Preconditions and test data

Preconditions

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

Test data

  • dialog: Cancel this synthetic reservation?

Expected result

The confirmation facts and table both show cancelled status for only the active synthetic session.

Progressive hints

Hint 1

Create a synthetic booking first.

Hint 2

Use the button labelled Cancel confirmed booking.

Hint 3

Scope the action to the native dialog before asserting cancelled status.

I’ve tried it — show solution
  1. Create a synthetic booking first.
  2. Use the button labelled Cancel confirmed booking.
  3. Scope the action to the native dialog before asserting cancelled status.

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