From 6477bf5e39c7f34a94cc1059d5c4b5e009826714 Mon Sep 17 00:00:00 2001 From: Maurice Date: Tue, 20 Oct 2026 10:12:36 +0200 Subject: [PATCH] test(admin): fail the addon load with a server error, not a dropped connection A network error starts the client's connectivity probe, and whether the app then counted itself offline, where it stays quiet on purpose, raced the error toast on a loaded runner (FE-MOB-AADD-004 failed in CI twice). A 500 fails the load the same way and toasts every time. --- client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx b/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx index dc75a6fd4..cab6a32df 100644 --- a/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx +++ b/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx @@ -102,7 +102,10 @@ describe('MAdminAddonManager', () => { }); it('FE-MOB-AADD-004: a failing load toasts the addon error', async () => { - server.use(http.get('/api/admin/addons', () => HttpResponse.error())); + // A server error, not a dropped connection: a network error starts the client's + // connectivity probe, and whether the app then counts itself offline (and stays + // quiet, as it should offline) raced the toast on a loaded runner. + server.use(http.get('/api/admin/addons', () => HttpResponse.json({ error: 'boom' }, { status: 500 }))); render(<>); await screen.findByText('Failed to update addon');