@@ -13,6 +13,7 @@ import {
1313 TIMEOUT_1_SECOND ,
1414 TIMEOUT_3_SECONDS ,
1515 TIMEOUT_30_SECONDS ,
16+ TIMEOUT_2_SECONDS ,
1617 } from '../../const/constants' ;
1718
1819let settingsPage : SettingsPage ;
@@ -55,29 +56,12 @@ test.describe('account settings on mobile browser', {
5556 await settingsPage . scrollIntoView ( settingsPage . bookingPageURLInput ) ;
5657 expect ( await settingsPage . bookingPageURLInput . inputValue ( ) ) . toBe ( APPT_MY_SHARE_LINK ) ;
5758
58- // click copy link button and verify copied link is correct
59- // note: we can't access clipboard in firefox b/c of security so instead we will:
60- // - get the contents of the booking page URL input field (correct link)
61- // - click the copy link button
62- // - clear the booking page URL input field so it is empty
63- // - focus on the booking page URL input field
64- // - do a keyboard paste into the field
65- // - retrieve the new contents of the booking page url after the paste into that field
66- // - verify the input field now has the correct link url
67- const correctBookingUrl = await settingsPage . bookingPageURLInput . inputValue ( ) ;
68- await settingsPage . copyLinkBtn . click ( ) ;
69- await settingsPage . bookingPageURLInput . clear ( ) ;
70- await page . waitForTimeout ( TIMEOUT_1_SECOND ) ;
71- await settingsPage . bookingPageURLInput . focus ( ) ;
72- // paste using keyboard, different command for ios
73- if ( testInfo . project . name . includes ( 'ios' ) ) {
74- await page . keyboard . press ( 'Meta+V' ) ;
75- } else {
76- await page . keyboard . press ( 'ControlOrMeta+V' ) ;
59+ // ensure we can click the copy link button; note: we can't access clipboard in firefox b/c of security
60+ await settingsPage . scrollIntoView ( settingsPage . copyLinkBtn ) ;
61+ if ( ! testInfo . project . name . includes ( 'ios' ) ) { // 'toBeEnabled' is not supported on BrowserStack for ios at least not yet
62+ await expect ( settingsPage . copyLinkBtn ) . toBeEnabled ( ) ;
7763 }
78- await page . waitForTimeout ( TIMEOUT_1_SECOND ) ;
79- const afterPasteBookingUrl = await settingsPage . bookingPageURLInput . inputValue ( ) ;
80- expect ( afterPasteBookingUrl ) . toEqual ( correctBookingUrl ) ;
64+ await settingsPage . copyLinkBtn . click ( ) ;
8165
8266 // just ensure the download your data button exists and is enabled as don't want to actually
8367 // download and leave potenial sensitive data on the test instance
0 commit comments