88 TIMEOUT_5_SECONDS ,
99 TIMEOUT_30_SECONDS ,
1010 APPT_LANGUAGE_SETTING_EN ,
11+ APPT_START_OF_WEEK_MON ,
1112 } from '../const/constants' ;
1213
1314
@@ -31,9 +32,9 @@ export class SettingsPage {
3132 readonly bookingPageURLInput : Locator ;
3233 readonly copyLinkBtn : Locator ;
3334 readonly copyLinkToolTipText : Locator ;
34- readonly cancelServiceBtn : Locator ;
35- readonly cancelServiceConfirmCancelBtn : Locator ;
36- readonly bookingPageSettingsBtn : Locator ;
35+ readonly deleteDataBtn : Locator ;
36+ readonly deleteDataConfirmCancelBtn : Locator ;
37+ readonly manageBookingLink : Locator ;
3738 readonly downloadDataBtn : Locator ;
3839 readonly connectedAppsHdr : Locator ;
3940 readonly addCaldavBtn : Locator ;
@@ -42,7 +43,7 @@ export class SettingsPage {
4243 readonly addCaldavPasswordInput : Locator ;
4344 readonly addCaldavCloseModalBtn : Locator ;
4445 readonly addGoogleBtn : Locator ;
45- readonly defaultCalendarConnectedCbox : Locator ;
46+ readonly defaultCalendarBadge : Locator ;
4647 readonly saveBtnEN : Locator ;
4748 readonly savedSuccessfullyTextEN : Locator ;
4849 readonly savedSuccessfullyTextDE : Locator ;
@@ -57,10 +58,10 @@ export class SettingsPage {
5758 // main settings view
5859 this . settingsHeaderEN = this . page . getByRole ( 'main' ) . getByText ( 'Settings' , { exact : true } ) ;
5960 this . settingsHeaderDE = this . page . getByRole ( 'heading' , { name : 'Einstellungen' } ) . first ( ) ;
60- this . saveBtnEN = this . page . getByRole ( 'button' , { name : 'Save' } ) ;
61+ this . saveBtnEN = this . page . getByRole ( 'button' , { name : 'Save' } ) . nth ( 1 ) ; // save button at bottom, not in notice bar
6162 this . savedSuccessfullyTextEN = this . page . getByText ( 'Settings saved successfully' , { exact : true } ) ;
6263 this . savedSuccessfullyTextDE = this . page . getByText ( 'Einstellungen erfolgreich gespeichert' , { exact : true } ) ;
63- this . saveBtnDE = this . page . getByRole ( 'button' , { name : 'Speichern' } ) ;
64+ this . saveBtnDE = this . page . getByRole ( 'button' , { name : 'Speichern' } ) . nth ( 1 ) ;
6465 this . revertBtn = this . page . getByRole ( 'button' , { name : 'Revert changes' } ) ;
6566
6667 // account settings section
@@ -70,9 +71,9 @@ export class SettingsPage {
7071 this . bookingPageURLInput = this . page . locator ( '#booking-page-url' ) ;
7172 this . copyLinkBtn = this . page . locator ( '#copy-booking-page-url-button' ) ;
7273 this . copyLinkToolTipText = this . page . locator ( '#tooltip-body' ) ;
73- this . cancelServiceBtn = this . page . getByRole ( 'button' , { name : 'Cancel Service ' } ) ;
74- this . cancelServiceConfirmCancelBtn = this . page . getByRole ( 'button' , { name : 'Cancel' , exact : true } ) ;
75- this . bookingPageSettingsBtn = this . page . getByRole ( 'button' , { name : 'Booking Page Settings' } ) ;
74+ this . deleteDataBtn = this . page . getByRole ( 'button' , { name : 'Delete all Appointment data ' } ) ;
75+ this . deleteDataConfirmCancelBtn = this . page . getByRole ( 'button' , { name : 'Cancel' , exact : true } ) ;
76+ this . manageBookingLink = this . page . getByText ( 'Manage booking link' ) ;
7677 this . downloadDataBtn = this . page . getByTestId ( 'settings-account-download-data-btn' ) ;
7778
7879 // preferences section
@@ -82,8 +83,8 @@ export class SettingsPage {
8283 this . preferencesHeaderEN = this . page . getByRole ( 'heading' , { name : 'Preferences' } )
8384 this . preferencesHeaderDE = this . page . locator ( '#preferences' ) . getByRole ( 'heading' , { name : 'Einstellungen' } ) ;
8485 this . defaultTimeZoneSelect = this . page . getByTestId ( 'settings-preferences-default-time-zone-select' ) ;
85- this . startOfWeekMondayBtn = this . page . getByRole ( 'button' , { name : 'M ' , exact : true } ) ;
86- this . startOfWeekSundayBtn = this . page . getByRole ( 'button' , { name : 'S ' , exact : true } ) ;
86+ this . startOfWeekMondayBtn = this . page . getByRole ( 'button' , { name : 'Mon ' , exact : true } ) ;
87+ this . startOfWeekSundayBtn = this . page . getByRole ( 'button' , { name : 'Sun ' , exact : true } ) ;
8788
8889 // connected apps section
8990 this . connectedAppsBtn = this . page . getByTestId ( 'settings-connectedApplications-settings-btn' ) ;
@@ -94,7 +95,7 @@ export class SettingsPage {
9495 this . addCaldavPasswordInput = this . page . getByLabel ( 'Password' ) ;
9596 this . addCaldavCloseModalBtn = this . page . getByRole ( 'img' , { name : 'Close' } ) ;
9697 this . addGoogleBtn = this . page . getByRole ( 'button' , { name : 'Add Google Calendar' } ) ;
97- this . defaultCalendarConnectedCbox = this . page . locator ( 'div' ) . filter ( { hasText : / ^ D e f a u l t * / } ) . getByTestId ( 'checkbox-input ' ) ;
98+ this . defaultCalendarBadge = this . page . getByTestId ( 'badge ' ) ;
9899 this . googleSignInHdr = this . page . getByText ( 'Sign in with Google' ) ;
99100 }
100101
@@ -208,7 +209,7 @@ export class SettingsPage {
208209 async changeStartOfWeekSetting ( startOfWeek : string ) {
209210 await this . scrollIntoView ( this . startOfWeekMondayBtn ) ;
210211 await this . page . waitForTimeout ( TIMEOUT_1_SECOND ) ;
211- if ( startOfWeek == 'M' ) {
212+ if ( startOfWeek == APPT_START_OF_WEEK_MON ) {
212213 await this . startOfWeekMondayBtn . click ( { timeout : TIMEOUT_30_SECONDS } ) ;
213214 } else {
214215 await this . startOfWeekSundayBtn . click ( { timeout : TIMEOUT_30_SECONDS } ) ;
0 commit comments