diff --git a/tests/ui/UnreadIndicatorsTest.tsx b/tests/ui/UnreadIndicatorsTest.tsx index f5e6076c125b..209cb2814f4a 100644 --- a/tests/ui/UnreadIndicatorsTest.tsx +++ b/tests/ui/UnreadIndicatorsTest.tsx @@ -826,9 +826,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 () => {