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.
This commit is contained in:
Maurice
2026-10-20 10:12:36 +02:00
parent 971133a1eb
commit 6477bf5e39
@@ -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(<><ToastContainer /><MAdminAddonManager /></>);
await screen.findByText('Failed to update addon');