Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

test(admin): wait for the addon list's empty state after a failed load

Mauricef79b2020d650
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(<><ToastContainer /><MAdminAddonManager /></>);
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 () => {