@@ -5,8 +5,9 @@ import { APPT_MY_SHARE_LINK, APPT_SHORT_SHARE_LINK_PREFIX, APPT_LONG_SHARE_LINK_
55export class BookingPage {
66 readonly page : Page ;
77 readonly titleText : Locator ;
8- readonly invitingText : Locator ;
9- readonly confirmBtn : Locator ;
8+ readonly bookATimeToMeetText : Locator ;
9+ readonly selectTimeSlotText : Locator ;
10+ readonly bookApptBtn : Locator ;
1011 readonly bookingCalendarHdrSun : Locator ;
1112 readonly bookingCalendarHdrMon : Locator ;
1213 readonly bookingCalendarHdrTue : Locator ;
@@ -19,7 +20,6 @@ export class BookingPage {
1920 readonly availableBookingSlot : Locator ;
2021 readonly bookSelectionNameInput : Locator ;
2122 readonly bookSelectionEmailInput : Locator ;
22- readonly bookSelectionBookBtn : Locator ;
2323 readonly bookingConfirmedTitleText : Locator ;
2424 readonly requestSentAvailabilityText : Locator ;
2525 readonly requestSentCloseBtn : Locator ;
@@ -32,7 +32,8 @@ export class BookingPage {
3232 constructor ( page : Page ) {
3333 this . page = page ;
3434 this . titleText = this . page . getByTestId ( 'booking-view-title-text' ) ;
35- this . invitingText = this . page . getByTestId ( 'booking-view-inviting-you-text' ) ;
35+ this . bookATimeToMeetText = this . page . getByTestId ( 'booking-view-book-a-time-to-meet-with-text' ) ;
36+ this . selectTimeSlotText = this . page . getByText ( 'Select an open time slot from the calendar' ) ;
3637 this . bookingCalendarHdrSun = this . page . getByText ( 'SUN' , { exact : true } ) ;
3738 this . bookingCalendarHdrMon = this . page . getByText ( 'MON' , { exact : true } ) ;
3839 this . bookingCalendarHdrTue = this . page . getByText ( 'TUE' , { exact : true } ) ;
@@ -41,12 +42,11 @@ export class BookingPage {
4142 this . bookingCalendarHdrFri = this . page . getByText ( 'FRI' , { exact : true } ) ;
4243 this . bookingCalendarHdrSat = this . page . getByText ( 'SAT' , { exact : true } ) ;
4344 this . bookingWeekPickerBtn = this . page . locator ( '.week-picker-button' ) ;
44- this . confirmBtn = this . page . getByTestId ( 'booking-view-confirm-selection-button' ) ;
45+ this . bookApptBtn = this . page . getByTestId ( 'booking-view-confirm-selection-button' ) ;
4546 this . nextWeekArrow = this . page . getByRole ( 'button' , { name : 'Next week' } ) ;
4647 this . availableBookingSlot = this . page . locator ( '.selectable-slot' , { hasNotText : 'Busy' } ) ;
4748 this . bookSelectionNameInput = this . page . getByPlaceholder ( 'First and last name' ) ;
4849 this . bookSelectionEmailInput = this . page . getByPlaceholder ( '[email protected] ' ) ; 49- this . bookSelectionBookBtn = this . page . getByRole ( 'button' , { name : 'Book' } ) ;
5050 this . bookingConfirmedTitleText = this . page . getByText ( 'Booking confirmed' ) ;
5151 this . requestSentAvailabilityText = this . page . getByText ( "'s Availability" ) ;
5252 this . requestSentCloseBtn = this . page . getByRole ( 'button' , { name : 'Close' } ) ;
@@ -63,7 +63,7 @@ export class BookingPage {
6363 async gotoBookingPageShortUrl ( ) {
6464 // the default share link is a short URL
6565 await this . page . goto ( APPT_MY_SHARE_LINK ) ;
66- await expect ( this . confirmBtn ) . toBeVisible ( { timeout : TIMEOUT_30_SECONDS } ) ;
66+ await expect ( this . selectTimeSlotText ) . toBeVisible ( { timeout : TIMEOUT_30_SECONDS } ) ;
6767 }
6868
6969 /**
@@ -74,7 +74,7 @@ export class BookingPage {
7474 const prodShareLinkUser : string = APPT_MY_SHARE_LINK . split ( APPT_SHORT_SHARE_LINK_PREFIX ) [ 1 ] ;
7575 const longLink : string = `${ APPT_LONG_SHARE_LINK_PREFIX } ${ prodShareLinkUser } ` ;
7676 await this . page . goto ( longLink ) ;
77- await expect ( this . confirmBtn ) . toBeVisible ( { timeout : TIMEOUT_30_SECONDS } ) ;
77+ await expect ( this . selectTimeSlotText ) . toBeVisible ( { timeout : TIMEOUT_30_SECONDS } ) ;
7878 }
7979
8080 /**
@@ -83,15 +83,15 @@ export class BookingPage {
8383 async gotoBookingPageWeekView ( ) {
8484 const weekLink : string = `${ APPT_MY_SHARE_LINK } #week` ;
8585 await this . page . goto ( weekLink ) ;
86- await expect ( this . confirmBtn ) . toBeVisible ( { timeout : TIMEOUT_30_SECONDS } ) ;
86+ await expect ( this . selectTimeSlotText ) . toBeVisible ( { timeout : TIMEOUT_30_SECONDS } ) ;
8787 }
8888
8989 /**
9090 * With the booking page week view already displayed, go forward to the next week.
9191 */
9292 async goForwardOneWeek ( ) {
9393 await this . nextWeekArrow . click ( ) ;
94- await expect ( this . confirmBtn ) . toBeVisible ( { timeout : TIMEOUT_30_SECONDS } ) ;
94+ await expect ( this . selectTimeSlotText ) . toBeVisible ( { timeout : TIMEOUT_30_SECONDS } ) ;
9595 }
9696
9797 /**
@@ -141,7 +141,7 @@ export class BookingPage {
141141 async finishBooking ( bookerName : string , bookerEmail : string ) {
142142 await this . bookSelectionNameInput . fill ( bookerName ) ;
143143 await this . bookSelectionEmailInput . fill ( bookerEmail ) ;
144- await this . bookSelectionBookBtn . click ( ) ;
144+ await this . bookApptBtn . click ( ) ;
145145 }
146146
147147 /**
0 commit comments