fix(app): harden account and workflow state

This commit is contained in:
cesnimda
2026-08-24 20:21:09 +02:00
parent e7cacad7d6
commit dca5daa1a2
32 changed files with 811 additions and 86 deletions
+7 -3
View File
@@ -27,7 +27,7 @@ const mockedApi = api as jest.Mocked<typeof api>;
function renderView() {
return render(
<MemoryRouter future={{ v7_startTransition: true, v7_relativeSplatPath: true }}>
<MemoryRouter>
<ToastProvider>
<I18nProvider>
<SettingsView
@@ -83,6 +83,7 @@ beforeEach(() => {
},
} as any);
}
if (url === '/notification-settings') return Promise.resolve({ data: { emailFollowUpRemindersEnabled: true } } as any);
return Promise.resolve({ data: {} } as any);
});
window.localStorage.clear();
@@ -110,11 +111,14 @@ test('settings view has no accent picker and uses one follow-up section, one not
expect(screen.queryAllByText(/open reminders/i)).toHaveLength(0);
fireEvent.click(screen.getByRole('tab', { name: /notifications/i }));
expect(screen.getByText(/notification settings/i)).toBeInTheDocument();
expect(screen.getByText(/^notification settings$/i)).toBeInTheDocument();
// SMTP status now lives under Admin → System → Settings (the old "check system status" link was removed).
expect(screen.getAllByText(/smtp delivery and test mail live under/i).length).toBe(1);
expect(screen.getByLabelText(/email reminders for follow-ups/i)).toBeInTheDocument();
expect(screen.getByLabelText(/email alerts for ghosted jobs/i)).toBeInTheDocument();
expect(screen.queryByLabelText(/email alerts for ghosted jobs/i)).not.toBeInTheDocument();
fireEvent.click(screen.getByLabelText(/email reminders for follow-ups/i));
fireEvent.click(screen.getByRole('button', { name: /save notification settings/i }));
expect(mockedApi.put).toHaveBeenCalledWith('/notification-settings', { emailFollowUpRemindersEnabled: false });
});
test('AI privacy settings are server-backed and external processing is local-only by default', async () => {