Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Fix calendar tests #188

Merged
merged 1 commit into from
Oct 17, 2022
Merged
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
13 changes: 11 additions & 2 deletions src/components/inputs/Dates/Calendar/Calendar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ describe('Calendar', () => {
const minDate = new Date(2022, 8, 26);

renderWithThemeProvider(
<Calendar data-testid="calendar" minDate={minDate} />
<Calendar
data-testid="calendar"
initialMonth={minDate}
minDate={minDate}
/>
);

const month = screen.getByRole('heading');
Expand All @@ -64,7 +68,11 @@ describe('Calendar', () => {
const maxDate = new Date(2022, 8, 26);

renderWithThemeProvider(
<Calendar data-testid="calendar" maxDate={maxDate} />
<Calendar
data-testid="calendar"
initialMonth={maxDate}
maxDate={maxDate}
/>
);

const month = screen.getByRole('heading');
Expand All @@ -85,6 +93,7 @@ describe('Calendar', () => {
renderWithThemeProvider(
<Calendar
data-testid="calendar"
initialMonth={minDate}
minDate={minDate}
onClick={mockFn}
/>
Expand Down