Skip to content

Commit

Permalink
feat(date-input, date-range): upgrade react-day-picker to v9
Browse files Browse the repository at this point in the history
Upgrades react-day-picker to remove the dependency on React 18
  • Loading branch information
damienrobson-sage committed Nov 19, 2024
1 parent 2d09514 commit 0f04a6a
Show file tree
Hide file tree
Showing 20 changed files with 733 additions and 447 deletions.
1 change: 1 addition & 0 deletions __mocks__/jest/styleMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
4 changes: 4 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Config } from "jest";

import coverageThresholds from "./coverage-thresholds.json";

const isCI = process.env.CI === "true";
Expand Down Expand Up @@ -30,6 +31,9 @@ const config: Config = {
"^.+\\.(js|mjs|jsx|ts|tsx)$": "babel-jest",
"^.+\\.svg$": "<rootDir>/svgTransform.mjs",
},
moduleNameMapper: {
"\\.(css|less)$": "<rootDir>/__mocks__/jest/styleMock.js",
},
};

export default config;
37 changes: 31 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
"lodash": "^4.17.21",
"polished": "^4.2.2",
"prop-types": "^15.8.1",
"react-day-picker": "~7.4.10",
"react-day-picker": "9.3.0",
"react-dnd": "^15.1.2",
"react-dnd-html5-backend": "^15.1.3",
"react-is": "^17.0.2",
Expand Down
3 changes: 2 additions & 1 deletion playwright/components/date-input/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type { Page } from "@playwright/test";

import { DAY_PICKER_WRAPPER, DAY_PICKER_HEADING } from "./locators";

// component preview locators

export const dayPickerWrapper = (page: Page) =>
page.locator(DAY_PICKER_WRAPPER);
export const dayPickerHeading = (page: Page) =>
page.locator(DAY_PICKER_HEADING).locator("div");
page.locator(DAY_PICKER_HEADING);
4 changes: 2 additions & 2 deletions playwright/components/date-input/locators.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// component preview locators
export const DAY_PICKER_WRAPPER = 'div[class="DayPicker-wrapper"]';
export const DAY_PICKER_HEADING = ".DayPicker-Caption";
export const DAY_PICKER_WRAPPER = 'div[class="rdp-root"]';
export const DAY_PICKER_HEADING = 'span[class="rdp-caption_label"]';
Loading

0 comments on commit 0f04a6a

Please sign in to comment.