77 mediaArray ,
88 testLink ,
99} from './constants/variables' ;
10+ import { Conversation , Global } from './locators' ;
1011import { test_Alice_1W_Bob_1W } from './setup/sessionTest' ;
1112import { createContact } from './utilities/create_contact' ;
1213import { joinCommunity } from './utilities/join_community' ;
@@ -52,7 +53,7 @@ mediaArray.forEach(({ mediaType, path, attachmentType }) => {
5253 await Promise . all ( [
5354 waitForTestIdWithText (
5455 aliceWindow1 ,
55- 'disappear-control-message' ,
56+ Conversation . disappearingControlMessage . selector ,
5657 englishStrippedStr ( 'disappearingMessagesSetYou' )
5758 . withArgs ( {
5859 time : formattedTime ,
@@ -62,7 +63,7 @@ mediaArray.forEach(({ mediaType, path, attachmentType }) => {
6263 ) ,
6364 waitForTestIdWithText (
6465 bobWindow1 ,
65- 'disappear-control-message' ,
66+ Conversation . disappearingControlMessage . selector ,
6667 englishStrippedStr ( 'disappearingMessagesSet' )
6768 . withArgs ( {
6869 time : formattedTime ,
@@ -110,7 +111,7 @@ test_Alice_1W_Bob_1W(
110111 await Promise . all ( [
111112 waitForTestIdWithText (
112113 aliceWindow1 ,
113- 'disappear-control-message' ,
114+ Conversation . disappearingControlMessage . selector ,
114115 englishStrippedStr ( 'disappearingMessagesSetYou' )
115116 . withArgs ( {
116117 time : formattedTime ,
@@ -120,7 +121,7 @@ test_Alice_1W_Bob_1W(
120121 ) ,
121122 waitForTestIdWithText (
122123 bobWindow1 ,
123- 'disappear-control-message' ,
124+ Conversation . disappearingControlMessage . selector ,
124125 englishStrippedStr ( 'disappearingMessagesSet' )
125126 . withArgs ( {
126127 time : formattedTime ,
@@ -159,7 +160,7 @@ test_Alice_1W_Bob_1W(
159160 await Promise . all ( [
160161 waitForTestIdWithText (
161162 aliceWindow1 ,
162- 'disappear-control-message' ,
163+ Conversation . disappearingControlMessage . selector ,
163164 englishStrippedStr ( 'disappearingMessagesSetYou' )
164165 . withArgs ( {
165166 time : formattedTime ,
@@ -169,7 +170,7 @@ test_Alice_1W_Bob_1W(
169170 ) ,
170171 waitForTestIdWithText (
171172 bobWindow1 ,
172- 'disappear-control-message' ,
173+ Conversation . disappearingControlMessage . selector ,
173174 englishStrippedStr ( 'disappearingMessagesSet' )
174175 . withArgs ( {
175176 time : formattedTime ,
@@ -213,7 +214,7 @@ test_Alice_1W_Bob_1W(
213214 await Promise . all ( [
214215 waitForTestIdWithText (
215216 aliceWindow1 ,
216- 'disappear-control-message' ,
217+ Conversation . disappearingControlMessage . selector ,
217218 englishStrippedStr ( 'disappearingMessagesSetYou' )
218219 . withArgs ( {
219220 time : formattedTime ,
@@ -223,7 +224,7 @@ test_Alice_1W_Bob_1W(
223224 ) ,
224225 waitForTestIdWithText (
225226 bobWindow1 ,
226- 'disappear-control-message' ,
227+ Conversation . disappearingControlMessage . selector ,
227228 englishStrippedStr ( 'disappearingMessagesSet' )
228229 . withArgs ( {
229230 time : formattedTime ,
@@ -243,7 +244,11 @@ test_Alice_1W_Bob_1W(
243244 'modal-heading' ,
244245 englishStrippedStr ( 'membersInvite' ) . toString ( ) ,
245246 ) ;
246- await clickOnTestIdWithText ( aliceWindow1 , 'contact' , bob . userName ) ;
247+ await clickOnTestIdWithText (
248+ aliceWindow1 ,
249+ Global . contactItem . selector ,
250+ bob . userName ,
251+ ) ;
247252 await clickOnTestIdWithText ( aliceWindow1 , 'session-confirm-ok-button' ) ;
248253 // For lack of a unique ID we use native Playwright methods
249254 await aliceWindow1
0 commit comments