Skip to content

Commit

Permalink
test: update test failing on last day of the month
Browse files Browse the repository at this point in the history
refs: SHELL-70 (#272)
  • Loading branch information
beawar authored Jun 30, 2023
1 parent 42e7fae commit 312b45d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ describe('out of office time period section', () => {
/>
);
const untilDateInput = screen.getByRole('textbox', { name: /end date/i });
const firstOfNextMonth = new Date(fromDate);
const firstOfNextMonth = new Date(untilDate);
firstOfNextMonth.setDate(1);
firstOfNextMonth.setMonth(fromDate.getMonth() + 1);
firstOfNextMonth.setMonth(untilDate.getMonth() + 1);
await user.click(untilDateInput);
await user.click(screen.getByRole('button', { name: /next month/i }));
await user.click(
Expand Down Expand Up @@ -238,9 +238,9 @@ describe('out of office time period section', () => {
</>
);
const untilDateInput = screen.getByRole('textbox', { name: /end date/i });
const firstOfNextMonth = new Date(fromDate);
const firstOfNextMonth = new Date(untilDate);
firstOfNextMonth.setDate(1);
firstOfNextMonth.setMonth(fromDate.getMonth() + 1);
firstOfNextMonth.setMonth(untilDate.getMonth() + 1);
await user.clear(untilDateInput);
await user.type(untilDateInput, format(firstOfNextMonth, 'P'));
await user.click(screen.getByText(/click to blur/i));
Expand Down

0 comments on commit 312b45d

Please sign in to comment.