File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,11 +39,18 @@ test('comment thread on tracked change shows both the change and replies', async
3939 await expect ( dialog . locator ( '.tracked-change-text.is-inserted' , { hasText : 'new text' } ) ) . toBeVisible ( ) ;
4040 await expect ( dialog . locator ( '.tracked-change-text.is-deleted' ) . first ( ) ) . toBeVisible ( ) ;
4141
42- // The threaded comment replies should be visible below the tracked change
42+ // Threads with >=2 replies are collapsed by default: only the latest reply is visible
43+ const collapsedPill = dialog . locator ( '.collapsed-replies' ) ;
44+ await expect ( collapsedPill ) . toBeVisible ( { timeout : 5_000 } ) ;
45+ await expect ( collapsedPill ) . toContainText ( '1 more reply' ) ;
46+
47+ // In collapsed state, only one reply body is visible
4348 const commentBodies = dialog . locator ( '.comment-body .comment' ) ;
44- await expect ( commentBodies ) . toHaveCount ( 2 ) ;
45- await expect ( commentBodies . nth ( 0 ) ) . toContainText ( 'reply to tracked change' ) ;
46- await expect ( commentBodies . nth ( 1 ) ) . toContainText ( 'reply to reply' ) ;
49+ await expect ( commentBodies ) . toHaveCount ( 1 ) ;
50+ await expect ( commentBodies . first ( ) ) . toContainText ( 'reply to reply' ) ;
51+
52+ // Hidden reply summary should remain visible in collapsed mode
53+ await expect ( collapsedPill ) . toBeVisible ( ) ;
4754
4855 await superdoc . snapshot ( 'comment thread on tracked change' ) ;
4956} ) ;
You can’t perform that action at this time.
0 commit comments