The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(cron): cover the modal's generic-label fallback
Shanu55283ab0431e
diff --git a/app/src/components/settings/panels/cron/CronJobFormModal.test.tsx b/app/src/components/settings/panels/cron/CronJobFormModal.test.tsxindex 04ae67f9c7..e4223a8201 100644--- a/app/src/components/settings/panels/cron/CronJobFormModal.test.tsx+++ b/app/src/components/settings/panels/cron/CronJobFormModal.test.tsx@@ -287,6 +287,21 @@ describe('<CronJobFormModal />', () => {);});+ it('falls back to the generic label when the rejection carries no message', async () => {+ const onCreate = vi.fn().mockRejectedValue(new Error(''));+ render(<CronJobFormModal {...makeProps({ onCreate })} />);++ fireEvent.change(screen.getByTestId('cron-form-prompt'), { target: { value: 'Some prompt' } });+ fireEvent.click(screen.getByTestId('cron-form-submit'));++ await waitFor(() => {+ expect(screen.getByTestId('cron-form-error')).toBeInTheDocument();+ });++ // No trailing ": " when there is nothing to append.+ expect(screen.getByTestId('cron-form-error')).toHaveTextContent(/^Failed to save job$/);+ });+// ── Create: "at" schedule ───────────────────────────────────────────it('submits with at-schedule, isoifies datetime input', async () => {const onCreate = vi.fn().mockResolvedValue(undefined);