From 301a5bbb5a4470028b01fdfb7b2b1f466a31ab18 Mon Sep 17 00:00:00 2001 From: Maurice Date: Tue, 20 Oct 2026 05:51:22 +0000 Subject: [PATCH] test(admin): wait for the addon list's empty state after a failed load The empty state shows once loading has ended, which can come a render after the toast; the test read it in the same tick and failed now and then. --- client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx b/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx index 39100d9b5..dc75a6fd4 100644 --- a/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx +++ b/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx @@ -106,7 +106,8 @@ describe('MAdminAddonManager', () => { render(<>); await screen.findByText('Failed to update addon'); - expect(screen.getByText('No addons available')).toBeInTheDocument(); + // The empty state follows the toast once loading has ended, not in the same render. + expect(await screen.findByText('No addons available')).toBeInTheDocument(); }); it('FE-MOB-AADD-005: trip addons render with the section band, catalog label and type badge', async () => {