@@ -42,21 +42,21 @@ sessionTestOneWindow('Link a device', async ([aliceWindow1]) => {
4242 try {
4343 const userA = await newUser ( aliceWindow1 , 'Alice' ) ;
4444 aliceWindow2 = await linkedDevice ( userA . recoveryPassword ) ; // not using fixture here as we want to check the behavior finely
45- await clickOnTestIdWithText ( aliceWindow1 , 'leftpane-primary-avatar' ) ;
45+ await clickOnTestIdWithText ( aliceWindow1 , LeftPane . profileButton . selector ) ;
4646 // Verify Username
4747 await waitForTestIdWithText (
4848 aliceWindow1 ,
49- 'your-profile-name' ,
49+ Settings . displayName . selector ,
5050 userA . userName ,
5151 ) ;
5252 // Verify Account ID
5353 await waitForTestIdWithText (
5454 aliceWindow1 ,
55- 'your-account-id' ,
55+ Settings . accountId . selector ,
5656 userA . accountid ,
5757 ) ;
5858 // exit profile modal
59- await clickOnTestIdWithText ( aliceWindow1 , 'modal-close-button' ) ;
59+ await clickOnTestIdWithText ( aliceWindow1 , Global . modalCloseButton . selector ) ;
6060 // You're almost finished isn't displayed
6161 const errorDesc = 'Should not be found' ;
6262 try {
@@ -143,11 +143,20 @@ test_Alice_2W(
143143 await clickOnTestIdWithText ( aliceWindow1 , LeftPane . profileButton . selector ) ;
144144 // Click on current profile picture
145145 await clickOnTestIdWithText ( aliceWindow1 , Settings . displayName . selector ) ;
146- await clickOnTestIdWithText ( aliceWindow1 , 'image-upload-section' ) ;
147- await clickOnTestIdWithText ( aliceWindow1 , 'image-upload-click' ) ;
146+ await clickOnTestIdWithText (
147+ aliceWindow1 ,
148+ Settings . imageUploadSection . selector ,
149+ ) ;
150+ await clickOnTestIdWithText (
151+ aliceWindow1 ,
152+ Settings . imageUploadClick . selector ,
153+ ) ;
148154 // allow for the image to be resized before we try to save it
149155 await sleepFor ( 500 ) ;
150- await clickOnTestIdWithText ( aliceWindow1 , 'save-button-profile-update' ) ;
156+ await clickOnTestIdWithText (
157+ aliceWindow1 ,
158+ Settings . saveProfileUpdateButton . selector ,
159+ ) ;
151160 await waitForLoadingAnimationToFinish ( aliceWindow1 , 'loading-spinner' ) ;
152161 await clickOnMatchingText (
153162 aliceWindow1 ,
@@ -443,17 +452,23 @@ test_Alice_2W_Bob_1W(
443452test_Alice_2W (
444453 'Hide note to self syncs' ,
445454 async ( { alice, aliceWindow1, aliceWindow2 } ) => {
446- await clickOnTestIdWithText ( aliceWindow1 , 'new-conversation-button' ) ;
447455 await clickOnTestIdWithText (
448456 aliceWindow1 ,
449- 'chooser-new-conversation-button' ,
457+ HomeScreen . plusButton . selector ,
458+ ) ;
459+ await clickOnTestIdWithText (
460+ aliceWindow1 ,
461+ HomeScreen . newMessageOption . selector ,
450462 ) ;
451463 await typeIntoInput (
452464 aliceWindow1 ,
453- 'new-session-conversation' ,
465+ HomeScreen . newMessageAccountIDInput . selector ,
454466 alice . accountid ,
455467 ) ;
456- await clickOnTestIdWithText ( aliceWindow1 , 'next-new-conversation-button' ) ;
468+ await clickOnTestIdWithText (
469+ aliceWindow1 ,
470+ HomeScreen . newMessageNextButton . selector ,
471+ ) ;
457472 await waitForTestIdWithText (
458473 aliceWindow1 ,
459474 'header-conversation-name' ,
@@ -464,18 +479,18 @@ test_Alice_2W(
464479 await sleepFor ( 1000 ) ;
465480 await waitForTestIdWithText (
466481 aliceWindow2 ,
467- 'module-conversation__user__profile-name' ,
482+ HomeScreen . conversationItemName . selector ,
468483 englishStrippedStr ( 'noteToSelf' ) . toString ( ) ,
469484 ) ;
470485 await clickOnTestIdWithText (
471486 aliceWindow1 ,
472- 'module-conversation__user__profile-name' ,
487+ HomeScreen . conversationItemName . selector ,
473488 englishStrippedStr ( 'noteToSelf' ) . toString ( ) ,
474489 true ,
475490 ) ;
476491 await clickOnTestIdWithText (
477492 aliceWindow1 ,
478- 'context-menu-item' ,
493+ Global . contextMenuItem . selector ,
479494 englishStrippedStr ( 'noteToSelfHide' ) . toString ( ) ,
480495 ) ;
481496 await checkModalStrings (
@@ -485,7 +500,7 @@ test_Alice_2W(
485500 ) ;
486501 await clickOnTestIdWithText (
487502 aliceWindow1 ,
488- 'session-confirm-ok-button' ,
503+ Global . confirmButton . selector ,
489504 englishStrippedStr ( 'hide' ) . toString ( ) ,
490505 ) ;
491506 // Check linked device for hidden note to self
@@ -494,14 +509,14 @@ test_Alice_2W(
494509 hasElementBeenDeleted (
495510 aliceWindow1 ,
496511 'data-testid' ,
497- 'module-conversation__user__profile-name' ,
512+ HomeScreen . conversationItemName . selector ,
498513 5000 ,
499514 englishStrippedStr ( 'noteToSelf' ) . toString ( ) ,
500515 ) ,
501516 hasElementBeenDeleted (
502517 aliceWindow2 ,
503518 'data-testid' ,
504- 'module-conversation__user__profile-name' ,
519+ HomeScreen . conversationItemName . selector ,
505520 15_000 ,
506521 englishStrippedStr ( 'noteToSelf' ) . toString ( ) ,
507522 ) ,
0 commit comments