{t('common.loading')}
} + {!matrix && ( +{loadFailed ? t('common.error') : t('common.loading')}
+ )} {matrix && visibleChannels.length === 0 && ({t('settings.notificationPreferences.noChannels')}
diff --git a/client/tests/unit/mobile/settings/MSettingsNotifications.test.tsx b/client/tests/unit/mobile/settings/MSettingsNotifications.test.tsx index 4299149cb..df6d3289b 100644 --- a/client/tests/unit/mobile/settings/MSettingsNotifications.test.tsx +++ b/client/tests/unit/mobile/settings/MSettingsNotifications.test.tsx @@ -77,13 +77,14 @@ describe('MSettingsNotifications', () => { expect(screen.getByText('Loading...')).toBeInTheDocument(); }); - it('FE-MOB-SETNOTIF-002: a failing preferences load keeps the loading line instead of crashing', async () => { + it('FE-MOB-SETNOTIF-002: a failing preferences load shows an error instead of the loading line', async () => { server.use( http.get('/api/notifications/preferences', () => HttpResponse.json({ error: 'boom' }, { status: 500 })), http.get('/api/settings', () => HttpResponse.json({ error: 'boom' }, { status: 500 })), ); render(