fix(app): harden account and workflow state
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user