From 5fabd92471f37a056cc5c97104f37801e8ff3487 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Fri, 29 May 2026 16:43:22 -0700 Subject: [PATCH] Fix flaky UnreadIndicators mark-as-unread test by waiting for LHN row render Co-authored-by: Cursor --- tests/ui/UnreadIndicatorsTest.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/ui/UnreadIndicatorsTest.tsx b/tests/ui/UnreadIndicatorsTest.tsx index 1774b60df005..b84ee6a09add 100644 --- a/tests/ui/UnreadIndicatorsTest.tsx +++ b/tests/ui/UnreadIndicatorsTest.tsx @@ -827,9 +827,11 @@ describe('Unread Indicators', () => { await waitForBatchedUpdates(); const hintText = TestHelper.translateLocal('accessibilityHints.chatUserDisplayNames'); - const displayNameTexts = screen.queryAllByLabelText(hintText); - expect(displayNameTexts).toHaveLength(1); - expect((displayNameTexts.at(0)?.props?.style as TextStyle)?.fontWeight).toBe(FontUtils.fontWeight.bold); + await waitFor(() => { + const displayNameTexts = screen.queryAllByLabelText(hintText); + expect(displayNameTexts).toHaveLength(1); + expect((displayNameTexts.at(0)?.props?.style as TextStyle)?.fontWeight).toBe(FontUtils.fontWeight.bold); + }); }); it('Mark the last comment as unread should set lastReadTime to the last action’s creation time', async () => {