@@ -10,6 +10,7 @@ import {
1010 OutgoingMessageStatusSent ,
1111 SendButton ,
1212} from './locators/conversation' ;
13+ import { EnableLinkPreviewsModalButton } from './locators/global' ;
1314import { open_Alice1_Bob1_friends } from './state_builder' ;
1415import { sleepFor } from './utils' ;
1516import { closeApp , SupportedPlatformsType } from './utils/open_app' ;
@@ -45,7 +46,7 @@ async function sendLinkIos(platform: SupportedPlatformsType, testInfo: TestInfo)
4546 englishStrippedStr ( 'linkPreviewsEnable' ) . toString ( ) ,
4647 englishStrippedStr ( 'linkPreviewsFirstDescription' ) . toString ( )
4748 ) ;
48- await alice1 . clickOnByAccessibilityID ( 'Enable' ) ;
49+ await alice1 . clickOnElementAll ( new EnableLinkPreviewsModalButton ( alice1 ) ) ;
4950 await alice1 . clickOnElementAll ( new SendButton ( alice1 ) ) ;
5051 await alice1 . waitForTextElementToBePresent ( {
5152 ...new OutgoingMessageStatusSent ( alice1 ) . build ( ) ,
@@ -81,10 +82,7 @@ async function sendLinkAndroid(platform: SupportedPlatformsType, testInfo: TestI
8182 englishStrippedStr ( 'linkPreviewsEnable' ) . toString ( ) ,
8283 englishStrippedStr ( 'linkPreviewsFirstDescription' ) . toString ( )
8384 ) ;
84- await alice1 . clickOnElementAll ( {
85- strategy : 'accessibility id' ,
86- selector : 'Enable' ,
87- } ) ;
85+ await alice1 . clickOnElementAll ( new EnableLinkPreviewsModalButton ( alice1 ) ) ;
8886 //wait for preview to generate
8987 await sleepFor ( 5000 ) ;
9088 await alice1 . clickOnElementAll ( new SendButton ( alice1 ) ) ;
0 commit comments