mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-09 15:35:22 +02:00
fix datepicker tests
This commit is contained in:
parent
7234f9f044
commit
2b06d8cf1c
1 changed files with 2 additions and 3 deletions
|
@ -3,9 +3,6 @@ import { fireEvent, render, screen, waitFor } from '@testing-library/react'
|
||||||
import { DatePicker } from './'
|
import { DatePicker } from './'
|
||||||
import { DateTime } from 'luxon'
|
import { DateTime } from 'luxon'
|
||||||
|
|
||||||
// Set date to Oct 29, 2021 to keep snapshots consistent
|
|
||||||
beforeAll(() => jest.useFakeTimers().setSystemTime(new Date('2021-10-29 12:00:00')))
|
|
||||||
|
|
||||||
// DatePicker configuration
|
// DatePicker configuration
|
||||||
const minDate = DateTime.now().minus({ years: 2 })
|
const minDate = DateTime.now().minus({ years: 2 })
|
||||||
const maxDate = DateTime.now()
|
const maxDate = DateTime.now()
|
||||||
|
@ -74,6 +71,8 @@ describe('<DatePicker />', () => {
|
||||||
const currentMonth = DateTime.now()
|
const currentMonth = DateTime.now()
|
||||||
const priorMonth = DateTime.now().minus({ months: 1 })
|
const priorMonth = DateTime.now().minus({ months: 1 })
|
||||||
|
|
||||||
|
console.log(DateTime.now(), 'date')
|
||||||
|
|
||||||
// Open the modal
|
// Open the modal
|
||||||
fireEvent.click(screen.getByTestId('datepicker-toggle-icon'))
|
fireEvent.click(screen.getByTestId('datepicker-toggle-icon'))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue