66 TIMEOUT_1_SECOND ,
77 TIMEOUT_2_SECONDS ,
88 TIMEOUT_3_SECONDS ,
9- TIMEOUT_10_SECONDS ,
9+ TIMEOUT_5_SECONDS ,
1010 TIMEOUT_30_SECONDS ,
1111 APPT_LANGUAGE_SETTING_EN ,
1212 } from '../const/constants' ;
@@ -86,9 +86,9 @@ export class SettingsPage {
8686 this . connectedAppsBtn = this . page . getByTestId ( 'settings-connectedApplications-settings-btn' ) ;
8787 this . connectedAppsHdr = this . page . getByRole ( 'heading' , { name : 'Connected Applications' } ) ;
8888 this . addCaldavBtn = this . page . getByRole ( 'button' , { name : 'Add CalDAV' } ) ;
89- this . addCaldavUsernameInput = this . page . getByRole ( 'textbox' , { name : 'user' } ) ;
90- this . addCaldavLocationInput = this . page . getByRole ( 'textbox' , { name : ' Location The URL or hostname' } ) ;
91- this . addCaldavPasswordInput = this . page . getByRole ( 'textbox' , { name : 'password' } ) ;
89+ this . addCaldavUsernameInput = this . page . getByLabel ( 'Username' ) ;
90+ this . addCaldavLocationInput = this . page . getByLabel ( ' Location' ) ;
91+ this . addCaldavPasswordInput = this . page . getByLabel ( 'Password' ) ;
9292 this . addCaldavCloseModalBtn = this . page . getByRole ( 'img' , { name : 'Close' } ) ;
9393 this . addGoogleBtn = this . page . getByRole ( 'button' , { name : 'Add Google Calendar' } ) ;
9494 this . defaultCalendarConnectedCbox = this . page . locator ( 'div' ) . filter ( { hasText : / ^ D e f a u l t * / } ) . getByTestId ( 'checkbox-input' ) ;
@@ -99,7 +99,7 @@ export class SettingsPage {
9999 */
100100 async gotoAccountSettings ( ) {
101101 await this . page . goto ( APPT_SETTINGS_PAGE ) ;
102- await this . page . waitForTimeout ( TIMEOUT_3_SECONDS ) ;
102+ await this . page . waitForTimeout ( TIMEOUT_5_SECONDS ) ;
103103 await this . accountSettingsBtn . scrollIntoViewIfNeeded ( ) ;
104104 await this . accountSettingsBtn . click ( ) ;
105105 await this . page . waitForTimeout ( TIMEOUT_1_SECOND ) ;
@@ -110,7 +110,7 @@ export class SettingsPage {
110110 */
111111 async gotoPreferencesSettings ( ) {
112112 await this . page . goto ( APPT_SETTINGS_PAGE ) ;
113- await this . page . waitForTimeout ( TIMEOUT_3_SECONDS ) ;
113+ await this . page . waitForTimeout ( TIMEOUT_5_SECONDS ) ;
114114 await this . preferencesBtn . scrollIntoViewIfNeeded ( { timeout : TIMEOUT_30_SECONDS } ) ;
115115 await this . preferencesBtn . click ( ) ;
116116 await this . page . waitForTimeout ( TIMEOUT_1_SECOND ) ;
@@ -121,7 +121,7 @@ export class SettingsPage {
121121 */
122122 async gotoConnectedAppSettings ( ) {
123123 await this . page . goto ( APPT_SETTINGS_PAGE ) ;
124- await this . page . waitForTimeout ( TIMEOUT_3_SECONDS ) ;
124+ await this . page . waitForTimeout ( TIMEOUT_5_SECONDS ) ;
125125 await this . connectedAppsBtn . scrollIntoViewIfNeeded ( ) ;
126126 await this . connectedAppsBtn . click ( ) ;
127127 await this . page . waitForTimeout ( TIMEOUT_1_SECOND ) ;
@@ -161,6 +161,7 @@ export class SettingsPage {
161161 await this . page . waitForTimeout ( TIMEOUT_1_SECOND ) ;
162162 await expect ( this . savedSuccessfullyTextEN ) . toBeVisible ( ) ;
163163 }
164+ await this . page . waitForTimeout ( TIMEOUT_5_SECONDS ) ;
164165 }
165166
166167 /**
@@ -174,7 +175,7 @@ export class SettingsPage {
174175 await this . saveBtnEN . click ( ) ;
175176 await expect ( this . savedSuccessfullyTextEN ) . toBeVisible ( { timeout : TIMEOUT_30_SECONDS } ) ;
176177 // wait for theme to take affect, can take time especially on browserstack
177- await this . page . waitForTimeout ( TIMEOUT_10_SECONDS ) ;
178+ await this . page . waitForTimeout ( TIMEOUT_5_SECONDS ) ;
178179 }
179180
180181 /**
@@ -202,18 +203,6 @@ export class SettingsPage {
202203 await this . saveBtnEN . click ( ) ;
203204 await this . page . waitForTimeout ( TIMEOUT_1_SECOND ) ;
204205 await expect ( this . savedSuccessfullyTextEN ) . toBeVisible ( ) ;
205- }
206-
207- /**
208- * Change the display name setting
209- */
210- async changeDisplaName ( newName : string ) {
211- await this . displayNameInput . scrollIntoViewIfNeeded ( ) ;
212- await this . page . waitForTimeout ( TIMEOUT_1_SECOND ) ;
213- await this . displayNameInput . fill ( newName ) ;
214- await this . page . waitForTimeout ( TIMEOUT_1_SECOND ) ;
215- await this . saveBtnEN . scrollIntoViewIfNeeded ( ) ;
216- await this . saveBtnEN . click ( ) ;
217- await this . page . waitForTimeout ( TIMEOUT_3_SECONDS ) ;
206+ await this . page . waitForTimeout ( TIMEOUT_5_SECONDS ) ;
218207 }
219208}
0 commit comments