Skip to content

Commit

Permalink
EDSC-4125 test fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-zamora committed Jan 14, 2025
1 parent 1a9c298 commit 27e1d5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ const TemporalSelectionDropdown = ({

// When only start date exists and is in current year, use full range
if (existingStartDate && !existingEndDate) {
const startYear = moment(existingStartDate).utc().year()
const startYear = moment.utc(existingStartDate).year()
const currentYear = moment().utc().year()
if (startYear === currentYear) {
setTemporal({
...temporal,
isRecurring: isChecked,
startDate: minDate.startOf('year').toISOString(),
startDate: moment(existingStartDate).utc().year(minDate.year()).toISOString(),
endDate: moment().utc().toISOString()
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ describe('TemporalSelectionDropdown component', () => {
})
})

expect(startDateInput).toHaveValue('01-01 05:00:00')
expect(startDateInput).toHaveValue('01-01 00:00:00')
expect(endDateInput).toHaveValue('02-01 06:00:00')
expect(screen.getByText('Year Range:')).toBeInTheDocument()
expect(screen.getByText('1960 - 2024')).toBeInTheDocument()
Expand All @@ -750,7 +750,7 @@ describe('TemporalSelectionDropdown component', () => {
collection: {
temporal: {
isRecurring: true,
startDate: '1960-01-01T05:00:00.000Z',
startDate: '1960-01-01T00:00:00.000Z',
endDate: '2024-02-01T06:00:00.000Z',
recurringDayStart: '1',
recurringDayEnd: '32'
Expand Down Expand Up @@ -823,7 +823,6 @@ describe('TemporalSelectionDropdown component', () => {
const onChangeQueryMock = jest.fn()
const user = userEvent.setup()

console.log('HERE0')
setup({
onChangeQuery: onChangeQueryMock,
temporalSearch: {
Expand Down

0 comments on commit 27e1d5a

Please sign in to comment.