Skip to content

Commit bdb3a2f

Browse files
committed
fix(tests): wait for dialog deactivation before re-activating in collapse test
Firefox needs the active dialog to fully unmount before re-activation, otherwise the thread renders expanded instead of collapsed.
1 parent 3975f6e commit bdb3a2f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/behavior/tests/comments/comment-thread-collapse.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ test('thread with 2+ replies collapses and expands on click', async ({ superdoc
4242
});
4343
await superdoc.waitForStable();
4444

45+
// Wait for dialog to lose active state before re-activating — Firefox needs
46+
// this gap so the component fully unmounts its expanded state.
47+
const activeDialog = superdoc.page.locator('.comment-placeholder .comments-dialog.is-active');
48+
await expect(activeDialog).toHaveCount(0, { timeout: 5_000 });
49+
4550
// Activate the comment dialog
4651
const dialog = await activateCommentDialog(superdoc, 'collapse');
4752

0 commit comments

Comments
 (0)