@@ -612,6 +612,13 @@ test.describe( 'Disputes > Respond to a dispute', () => {
612
612
name : 'Save for later' ,
613
613
} )
614
614
. click ( ) ;
615
+
616
+ // Wait for the success snackbar to confirm UI acknowledged the save.
617
+ await expect (
618
+ merchantPage . locator ( '.components-snackbar__content' , {
619
+ hasText : 'Evidence saved!' ,
620
+ } )
621
+ ) . toBeVisible ( { timeout : 10000 } ) ;
615
622
} ) ;
616
623
617
624
await test . step ( 'Go back to the payment details page' , async ( ) => {
@@ -628,7 +635,7 @@ test.describe( 'Disputes > Respond to a dispute', () => {
628
635
) ;
629
636
630
637
await test . step (
631
- 'Verify the previously selected challenge product type is saved ' ,
638
+ 'Verify previously saved values are restored ' ,
632
639
async ( ) => {
633
640
await test . step (
634
641
'Confirm we are on the challenge dispute page' ,
@@ -641,15 +648,15 @@ test.describe( 'Disputes > Respond to a dispute', () => {
641
648
}
642
649
) ;
643
650
651
+ // Wait for controls to be visible
644
652
await merchantPage
645
653
. getByTestId ( 'dispute-challenge-product-type-selector' )
646
- . waitFor ( { timeout : 5000 , state : 'visible' } ) ;
654
+ . waitFor ( { timeout : 10000 , state : 'visible' } ) ;
647
655
656
+ // Assert the product description persisted (server stores this under evidence)
648
657
await expect (
649
- merchantPage . getByTestId (
650
- 'dispute-challenge-product-type-selector'
651
- )
652
- ) . toHaveValue ( 'offline_service' ) ;
658
+ merchantPage . getByLabel ( 'PRODUCT DESCRIPTION' )
659
+ ) . toHaveValue ( 'my product description' , { timeout : 10000 } ) ;
653
660
}
654
661
) ;
655
662
} ) ;
0 commit comments