mirror of
https://github.com/apache/superset.git
synced 2026-05-10 18:35:40 +00:00
refactor(date picker): Migrate Date Picker to Ant Design 5 (#31019)
Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
aae8fda11d
commit
b5e62753b7
@@ -21,8 +21,8 @@ import { render, screen } from '@testing-library/react';
|
||||
import '@testing-library/jest-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
import { ThemeProvider, supersetTheme } from '@superset-ui/core';
|
||||
import moment from 'moment';
|
||||
import { INVALID_DATE } from '@superset-ui/chart-controls';
|
||||
import { extendedDayjs } from 'src/utils/dates';
|
||||
import TimeOffsetControls, {
|
||||
TimeOffsetControlsProps,
|
||||
} from './TimeOffsetControl';
|
||||
@@ -73,8 +73,8 @@ describe('TimeOffsetControls', () => {
|
||||
|
||||
// Our Time comparison control depends on this string for supporting date deletion on date picker
|
||||
// That's why this test is linked to the TimeOffsetControl component
|
||||
it('Moment should return "Invalid date" when parsing an invalid date string', () => {
|
||||
const invalidDate = moment('not-a-date');
|
||||
it('Dayjs should return "Invalid date" when parsing an invalid date string', () => {
|
||||
const invalidDate = extendedDayjs('not-a-date');
|
||||
expect(invalidDate.format()).toBe(INVALID_DATE);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user