What a test can do with BookingPage
A page object controls which operations a test can perform.
your task
Type the fields, constructor, and methods of BookingPage. Keep the method behavior. Reject button replacement, direct calls to dialog, and construction from a text selector. The caller’s valid lines must compile.
BookingPage groups the controls and actions for a booking page. Its fields lack declarations. The caller should be able to read the Save button and call save. The exercise supplies the Playwright types.
Check types asks the compiler to read your file. It lists each type error with its line. Your code does not run. The exercise is solved when there are no type errors.
Starter code
or press Ctrl EnterNot run yet
type check
Not run yetbooking-page.ts
Expected result: no type errors.