Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIPBEX-62 Unable to save transfer configuration #130

Merged
merged 3 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/FormSection/SchedulingSection.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ describe('Scheduling section', () => {
),
);

expect(screen.queryAllByRole('textbox')).toHaveLength(3);
expect(screen.queryAllByRole('textbox')).toHaveLength(2);
expect(screen.getByRole('textbox', { name: 'Weeks between runs' })).toBeVisible();
expect(
screen.getByRole('textbox', {
name: (name: string) => name.startsWith('Start time'),
}),
).toBeVisible();
expect(screen.getByRole('textbox', { name: 'Run on weekdays' })).toBeVisible();
expect(screen.getByRole('combobox', { name: 'Run on weekdays' })).toBeVisible();
});
});
5 changes: 4 additions & 1 deletion src/components/FormSection/SchedulingSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@

const hoursDaysWeeksFrequencyComponent = (
<Col xs={12} md={6}>
<Field name="scheduling.interval">
<Field
name="scheduling.interval"
validate={(value) => Number.isNaN(+value) || +value <= 0 ? <FormattedMessage id="ui-plugin-bursar-export.bursarExports.scheduler.interval.error" /> : undefined}

Check failure on line 70 in src/components/FormSection/SchedulingSection.tsx

View workflow job for this annotation

GitHub Actions / ui / Install and lint / Install and lint

Arrow function used ambiguously with a conditional expression
>
{(fieldProps) => (
<TextField<number>
{...fieldProps}
Expand Down
1 change: 1 addition & 0 deletions translations/ui-plugin-bursar-export/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"bursarExports.scheduler.mutation.automatic.error": "Failed to save job",
"bursarExports.scheduler.mutation.manual.success": "Job has been scheduled",
"bursarExports.scheduler.mutation.manual.error": "Failed to start job",
"bursarExports.scheduler.interval.error": "Value must be greater than 0",

"bursarExports.criteria.accordion": "Criteria",
"bursarExports.criteria.select.allOf": "All of:",
Expand Down
Loading