-
Notifications
You must be signed in to change notification settings - Fork 69
fix: Fixes tests failing in React 17 #3112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Size Change: +73 B (0%) Total Size: 1.54 MB
ℹ️ View Unchanged
|
33237ce
to
924441e
Compare
4b20195
to
8db4bec
Compare
🦋 Changeset detectedLatest commit: 0218746 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes test failures that were occurring specifically in React 17 environments by addressing several testing-related issues and improving React version compatibility.
Key changes include:
- Refactoring the ProgressBar
useScreenReaderAnnouncer
hook to useuseState
anduseEffect
instead ofuseMemo
for more deterministic behavior in React 17 strict mode - Updating test utilities and patterns to correctly use
renderHook
andact
functions - Upgrading React Testing Library hooks version for better React 17 compatibility
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
tools/test/config/setup.js | Adds React version validation to prevent using React 18 test setup with React 17 |
scripts/react17/r17-packages.json | Updates @testing-library/react-hooks from 7.0.2 to 8.0.1 for React 17 compatibility |
packages/section-nav/src/utils/transformToNestedData/transformToNestedData.spec.ts | Fixes test to properly handle hook errors using renderHook result.error |
packages/resizable/src/useResizable/useResizable.spec.tsx | Improves test setup with proper type annotations and realistic MouseEvent handling |
packages/progress-bar/src/ProgressBar/hooks/useScreenReaderAnnouncer.tsx | Refactors hook from useMemo to useState/useEffect for deterministic behavior |
packages/progress-bar/src/ProgressBar/ProgressBar.spec.tsx | Updates tests to use proper act import and improves test structure |
packages/drawer/src/DrawerToolbarLayout/DrawerToolbarContext/DrawerToolbarContext.spec.tsx | Fixes error handling test to use renderHook result.error pattern |
chat/message/src/Message/Message.spec.tsx | Removes unnecessary consoleOnce assertion count check |
.github/workflows/react17.yml | Simplifies cache key handling by removing outputs dependency |
.changeset/progress-bar-strict.md | Documents the ProgressBar hook changes for release notes |
Comments suppressed due to low confidence (1)
packages/progress-bar/src/ProgressBar/ProgressBar.spec.tsx:1
- Duplicate spread of
requiredA11yArgs
on consecutive lines. The second spread should be removed as it's redundant and could mask potential issues.
import React from 'react';
packages/progress-bar/src/ProgressBar/hooks/useScreenReaderAnnouncer.tsx
Show resolved
Hide resolved
5f63659
to
0ebe400
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of question but nothing blocking. LGTM
const mockDiv: HTMLDivElement = document.createElement('div'); | ||
|
||
describe('useResizable', () => { | ||
const mockRef = { | ||
current: { | ||
...mockDiv, | ||
offsetWidth: 300, | ||
offsetHeight: 300, | ||
style: { | ||
...mockDiv.style, | ||
setProperty: jest.fn(), | ||
removeProperty: jest.fn(), | ||
}, | ||
}, | ||
} as HTMLDivElement, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious why this was needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Started getting flaky TS errors otherwise
…3111) * PolymorphicRenderFunctionReturnType * propTypes * tsdoc * Create poly-types.md * Update poly-types.md * Create poly-types.md * pkg json scripts * rename PolymorphicReturnType * Update Polymorphic.hooks.tsx * Update Polymorphic.hooks.tsx * rm pre-install step * Adds polymorphic tests to assert event type * fix: Fixes tests failing in React 17 (#3112) * Update r17-packages.json * Update transformToNestedData.spec.ts * Update DrawerToolbarContext.spec.tsx * Update Message.spec.tsx * WIP resizable * Update setup.js * useResizable * Update useScreenReaderAnnouncer.tsx * Update ProgressBar.spec.tsx * changeset * Update .changeset/progress-bar-strict.md * Update react17.yml * Update react17.yml * Update react17.yml * export isReact17 * Update transformToNestedData.spec.ts * Update transformToNestedData.spec.ts * rm cache: false * useDrawerToolbarContext tests * consistent queryByRole
commit 0a4821d Author: Adam Thompson <[email protected]> Date: Fri Sep 12 15:34:46 2025 -0400 [LG-5354, LG-5461] fix(Polymorphic) Updates Polymorphic return types (#3111) * PolymorphicRenderFunctionReturnType * propTypes * tsdoc * Create poly-types.md * Update poly-types.md * Create poly-types.md * pkg json scripts * rename PolymorphicReturnType * Update Polymorphic.hooks.tsx * Update Polymorphic.hooks.tsx * rm pre-install step * Adds polymorphic tests to assert event type * fix: Fixes tests failing in React 17 (#3112) * Update r17-packages.json * Update transformToNestedData.spec.ts * Update DrawerToolbarContext.spec.tsx * Update Message.spec.tsx * WIP resizable * Update setup.js * useResizable * Update useScreenReaderAnnouncer.tsx * Update ProgressBar.spec.tsx * changeset * Update .changeset/progress-bar-strict.md * Update react17.yml * Update react17.yml * Update react17.yml * export isReact17 * Update transformToNestedData.spec.ts * Update transformToNestedData.spec.ts * rm cache: false * useDrawerToolbarContext tests * consistent queryByRole
* Component compat * .ts compat * PolymorphicRenderFunctionReturnType * sync spec files * update Link & BackLink specs * Update useEchart.spec.ts * Update index.ts * Update FormField.spec.tsx * restore Popover.spec.tsx ts expect error * Update PasswordInput.spec.tsx * select spec * packages/table/src/utils/stories.testutils.tsx * sync ts files * @ts-ignore React18 * packages/popover/src/Popover/Popover.spec.tsx * Refresh RTLOverrides * packages/toast/src/InternalToast/InternalToast.stories.tsx * fix render hook * Update ExpandedContent.spec.tsx * charts/core/src/ChartContext/ChartContext.spec.tsx * changesets * renderDescendantsTestContext * cleanup tooltip tests * bump popover-polyfill * fix ToggleEvent type import * test(date-picker): wrap timer advancement in waitFor * test(getAllPackages): ensure temporary directories * Creates R17 init script * Delete install-react17.ts * Update react17.yml * Update init.ts * cleanup tsconfigs * Update package.json * install lodash. rm gh-pages * init defaults deep * rm clean from init script * lint * feat: add lib exists type * lint exports * storyoobk addon typoe * chore: update react17 files * Delete init.ts * lint * add separate R17 build & test jobs * Squashed commit of the following: commit 87dc0b6 Author: Adam Thompson <[email protected]> Date: Wed Sep 10 13:22:33 2025 -0400 [LG-5490] chore: React17 compatibility (#3101) * Component compat * .ts compat * PolymorphicRenderFunctionReturnType * sync spec files * update Link & BackLink specs * Update useEchart.spec.ts * Update index.ts * Update FormField.spec.tsx * restore Popover.spec.tsx ts expect error * Update PasswordInput.spec.tsx * select spec * packages/table/src/utils/stories.testutils.tsx * sync ts files * @ts-ignore React18 * packages/popover/src/Popover/Popover.spec.tsx * Refresh RTLOverrides * packages/toast/src/InternalToast/InternalToast.stories.tsx * fix render hook * Update ExpandedContent.spec.tsx * charts/core/src/ChartContext/ChartContext.spec.tsx * changesets * renderDescendantsTestContext * cleanup tooltip tests * bump popover-polyfill * fix ToggleEvent type import * test(date-picker): wrap timer advancement in waitFor * test(getAllPackages): ensure temporary directories * chore(testing-lib): RTL overrides re-organization (#3114) * Updates internal structure of RTL overrides * Update rtl-overrides.md * fix git mv * Update hooks.spec.tsx * fix act * Squashed commit of the following: commit 87dc0b6 Author: Adam Thompson <[email protected]> Date: Wed Sep 10 13:22:33 2025 -0400 [LG-5490] chore: React17 compatibility (#3101) * Component compat * .ts compat * PolymorphicRenderFunctionReturnType * sync spec files * update Link & BackLink specs * Update useEchart.spec.ts * Update index.ts * Update FormField.spec.tsx * restore Popover.spec.tsx ts expect error * Update PasswordInput.spec.tsx * select spec * packages/table/src/utils/stories.testutils.tsx * sync ts files * @ts-ignore React18 * packages/popover/src/Popover/Popover.spec.tsx * Refresh RTLOverrides * packages/toast/src/InternalToast/InternalToast.stories.tsx * fix render hook * Update ExpandedContent.spec.tsx * charts/core/src/ChartContext/ChartContext.spec.tsx * changesets * renderDescendantsTestContext * cleanup tooltip tests * bump popover-polyfill * fix ToggleEvent type import * test(date-picker): wrap timer advancement in waitFor * test(getAllPackages): ensure temporary directories * no --frozen-lockfile * [LG-5354, LG-5461] fix(Polymorphic) Updates Polymorphic return types (#3111) * PolymorphicRenderFunctionReturnType * propTypes * tsdoc * Create poly-types.md * Update poly-types.md * Create poly-types.md * pkg json scripts * rename PolymorphicReturnType * Update Polymorphic.hooks.tsx * Update Polymorphic.hooks.tsx * rm pre-install step * Adds polymorphic tests to assert event type * fix: Fixes tests failing in React 17 (#3112) * Update r17-packages.json * Update transformToNestedData.spec.ts * Update DrawerToolbarContext.spec.tsx * Update Message.spec.tsx * WIP resizable * Update setup.js * useResizable * Update useScreenReaderAnnouncer.tsx * Update ProgressBar.spec.tsx * changeset * Update .changeset/progress-bar-strict.md * Update react17.yml * Update react17.yml * Update react17.yml * export isReact17 * Update transformToNestedData.spec.ts * Update transformToNestedData.spec.ts * rm cache: false * useDrawerToolbarContext tests * consistent queryByRole
* Component compat * .ts compat * PolymorphicRenderFunctionReturnType * sync spec files * update Link & BackLink specs * Update useEchart.spec.ts * Update index.ts * Update FormField.spec.tsx * restore Popover.spec.tsx ts expect error * Update PasswordInput.spec.tsx * select spec * packages/table/src/utils/stories.testutils.tsx * sync ts files * @ts-ignore React18 * packages/popover/src/Popover/Popover.spec.tsx * Refresh RTLOverrides * packages/toast/src/InternalToast/InternalToast.stories.tsx * fix render hook * Update ExpandedContent.spec.tsx * charts/core/src/ChartContext/ChartContext.spec.tsx * changesets * renderDescendantsTestContext * cleanup tooltip tests * bump popover-polyfill * fix ToggleEvent type import * test(date-picker): wrap timer advancement in waitFor * test(getAllPackages): ensure temporary directories * Creates R17 init script * Delete install-react17.ts * Update react17.yml * Update init.ts * cleanup tsconfigs * Update package.json * install lodash. rm gh-pages * init defaults deep * rm clean from init script * lint * feat: add lib exists type * lint exports * storyoobk addon typoe * chore: update react17 files * Delete init.ts * lint * add separate R17 build & test jobs * Squashed commit of the following: commit 87dc0b6 Author: Adam Thompson <[email protected]> Date: Wed Sep 10 13:22:33 2025 -0400 [LG-5490] chore: React17 compatibility (#3101) * Component compat * .ts compat * PolymorphicRenderFunctionReturnType * sync spec files * update Link & BackLink specs * Update useEchart.spec.ts * Update index.ts * Update FormField.spec.tsx * restore Popover.spec.tsx ts expect error * Update PasswordInput.spec.tsx * select spec * packages/table/src/utils/stories.testutils.tsx * sync ts files * @ts-ignore React18 * packages/popover/src/Popover/Popover.spec.tsx * Refresh RTLOverrides * packages/toast/src/InternalToast/InternalToast.stories.tsx * fix render hook * Update ExpandedContent.spec.tsx * charts/core/src/ChartContext/ChartContext.spec.tsx * changesets * renderDescendantsTestContext * cleanup tooltip tests * bump popover-polyfill * fix ToggleEvent type import * test(date-picker): wrap timer advancement in waitFor * test(getAllPackages): ensure temporary directories * chore(testing-lib): RTL overrides re-organization (#3114) * Updates internal structure of RTL overrides * Update rtl-overrides.md * fix git mv * Update hooks.spec.tsx * fix act * Squashed commit of the following: commit 87dc0b6 Author: Adam Thompson <[email protected]> Date: Wed Sep 10 13:22:33 2025 -0400 [LG-5490] chore: React17 compatibility (#3101) * Component compat * .ts compat * PolymorphicRenderFunctionReturnType * sync spec files * update Link & BackLink specs * Update useEchart.spec.ts * Update index.ts * Update FormField.spec.tsx * restore Popover.spec.tsx ts expect error * Update PasswordInput.spec.tsx * select spec * packages/table/src/utils/stories.testutils.tsx * sync ts files * @ts-ignore React18 * packages/popover/src/Popover/Popover.spec.tsx * Refresh RTLOverrides * packages/toast/src/InternalToast/InternalToast.stories.tsx * fix render hook * Update ExpandedContent.spec.tsx * charts/core/src/ChartContext/ChartContext.spec.tsx * changesets * renderDescendantsTestContext * cleanup tooltip tests * bump popover-polyfill * fix ToggleEvent type import * test(date-picker): wrap timer advancement in waitFor * test(getAllPackages): ensure temporary directories * no --frozen-lockfile * [LG-5354, LG-5461] fix(Polymorphic) Updates Polymorphic return types (#3111) * PolymorphicRenderFunctionReturnType * propTypes * tsdoc * Create poly-types.md * Update poly-types.md * Create poly-types.md * pkg json scripts * rename PolymorphicReturnType * Update Polymorphic.hooks.tsx * Update Polymorphic.hooks.tsx * rm pre-install step * Adds polymorphic tests to assert event type * fix: Fixes tests failing in React 17 (#3112) * Update r17-packages.json * Update transformToNestedData.spec.ts * Update DrawerToolbarContext.spec.tsx * Update Message.spec.tsx * WIP resizable * Update setup.js * useResizable * Update useScreenReaderAnnouncer.tsx * Update ProgressBar.spec.tsx * changeset * Update .changeset/progress-bar-strict.md * Update react17.yml * Update react17.yml * Update react17.yml * export isReact17 * Update transformToNestedData.spec.ts * Update transformToNestedData.spec.ts * rm cache: false * useDrawerToolbarContext tests * consistent queryByRole * Update Polymorphic.hooks.tsx * Update Polymorphic.hooks.tsx * WIP resizable * useResizable * Update react17.yml * Update react17.yml * Update react17.yml * Update transformToNestedData.spec.ts * rm cache: false * useDrawerToolbarContext tests * Create reset.mjs * Update package.json * reset yaml * Update reset.mjs
* [LG-5490] chore: React17 compatibility (#3101) * Component compat * .ts compat * PolymorphicRenderFunctionReturnType * sync spec files * update Link & BackLink specs * Update useEchart.spec.ts * Update index.ts * Update FormField.spec.tsx * restore Popover.spec.tsx ts expect error * Update PasswordInput.spec.tsx * select spec * packages/table/src/utils/stories.testutils.tsx * sync ts files * @ts-ignore React18 * packages/popover/src/Popover/Popover.spec.tsx * Refresh RTLOverrides * packages/toast/src/InternalToast/InternalToast.stories.tsx * fix render hook * Update ExpandedContent.spec.tsx * charts/core/src/ChartContext/ChartContext.spec.tsx * changesets * renderDescendantsTestContext * cleanup tooltip tests * bump popover-polyfill * fix ToggleEvent type import * test(date-picker): wrap timer advancement in waitFor * test(getAllPackages): ensure temporary directories * [LG-5480] chore: Enables React 17 testing (#3110) * Component compat * .ts compat * PolymorphicRenderFunctionReturnType * sync spec files * update Link & BackLink specs * Update useEchart.spec.ts * Update index.ts * Update FormField.spec.tsx * restore Popover.spec.tsx ts expect error * Update PasswordInput.spec.tsx * select spec * packages/table/src/utils/stories.testutils.tsx * sync ts files * @ts-ignore React18 * packages/popover/src/Popover/Popover.spec.tsx * Refresh RTLOverrides * packages/toast/src/InternalToast/InternalToast.stories.tsx * fix render hook * Update ExpandedContent.spec.tsx * charts/core/src/ChartContext/ChartContext.spec.tsx * changesets * renderDescendantsTestContext * cleanup tooltip tests * bump popover-polyfill * fix ToggleEvent type import * test(date-picker): wrap timer advancement in waitFor * test(getAllPackages): ensure temporary directories * Creates R17 init script * Delete install-react17.ts * Update react17.yml * Update init.ts * cleanup tsconfigs * Update package.json * install lodash. rm gh-pages * init defaults deep * rm clean from init script * lint * feat: add lib exists type * lint exports * storyoobk addon typoe * chore: update react17 files * Delete init.ts * lint * add separate R17 build & test jobs * Squashed commit of the following: commit 87dc0b6 Author: Adam Thompson <[email protected]> Date: Wed Sep 10 13:22:33 2025 -0400 [LG-5490] chore: React17 compatibility (#3101) * Component compat * .ts compat * PolymorphicRenderFunctionReturnType * sync spec files * update Link & BackLink specs * Update useEchart.spec.ts * Update index.ts * Update FormField.spec.tsx * restore Popover.spec.tsx ts expect error * Update PasswordInput.spec.tsx * select spec * packages/table/src/utils/stories.testutils.tsx * sync ts files * @ts-ignore React18 * packages/popover/src/Popover/Popover.spec.tsx * Refresh RTLOverrides * packages/toast/src/InternalToast/InternalToast.stories.tsx * fix render hook * Update ExpandedContent.spec.tsx * charts/core/src/ChartContext/ChartContext.spec.tsx * changesets * renderDescendantsTestContext * cleanup tooltip tests * bump popover-polyfill * fix ToggleEvent type import * test(date-picker): wrap timer advancement in waitFor * test(getAllPackages): ensure temporary directories * chore(testing-lib): RTL overrides re-organization (#3114) * Updates internal structure of RTL overrides * Update rtl-overrides.md * fix git mv * Update hooks.spec.tsx * fix act * Squashed commit of the following: commit 87dc0b6 Author: Adam Thompson <[email protected]> Date: Wed Sep 10 13:22:33 2025 -0400 [LG-5490] chore: React17 compatibility (#3101) * Component compat * .ts compat * PolymorphicRenderFunctionReturnType * sync spec files * update Link & BackLink specs * Update useEchart.spec.ts * Update index.ts * Update FormField.spec.tsx * restore Popover.spec.tsx ts expect error * Update PasswordInput.spec.tsx * select spec * packages/table/src/utils/stories.testutils.tsx * sync ts files * @ts-ignore React18 * packages/popover/src/Popover/Popover.spec.tsx * Refresh RTLOverrides * packages/toast/src/InternalToast/InternalToast.stories.tsx * fix render hook * Update ExpandedContent.spec.tsx * charts/core/src/ChartContext/ChartContext.spec.tsx * changesets * renderDescendantsTestContext * cleanup tooltip tests * bump popover-polyfill * fix ToggleEvent type import * test(date-picker): wrap timer advancement in waitFor * test(getAllPackages): ensure temporary directories * no --frozen-lockfile * [LG-5354, LG-5461] fix(Polymorphic) Updates Polymorphic return types (#3111) * PolymorphicRenderFunctionReturnType * propTypes * tsdoc * Create poly-types.md * Update poly-types.md * Create poly-types.md * pkg json scripts * rename PolymorphicReturnType * Update Polymorphic.hooks.tsx * Update Polymorphic.hooks.tsx * rm pre-install step * Adds polymorphic tests to assert event type * fix: Fixes tests failing in React 17 (#3112) * Update r17-packages.json * Update transformToNestedData.spec.ts * Update DrawerToolbarContext.spec.tsx * Update Message.spec.tsx * WIP resizable * Update setup.js * useResizable * Update useScreenReaderAnnouncer.tsx * Update ProgressBar.spec.tsx * changeset * Update .changeset/progress-bar-strict.md * Update react17.yml * Update react17.yml * Update react17.yml * export isReact17 * Update transformToNestedData.spec.ts * Update transformToNestedData.spec.ts * rm cache: false * useDrawerToolbarContext tests * consistent queryByRole * chore: adds React17 reset script (#3115) * Component compat * .ts compat * PolymorphicRenderFunctionReturnType * sync spec files * update Link & BackLink specs * Update useEchart.spec.ts * Update index.ts * Update FormField.spec.tsx * restore Popover.spec.tsx ts expect error * Update PasswordInput.spec.tsx * select spec * packages/table/src/utils/stories.testutils.tsx * sync ts files * @ts-ignore React18 * packages/popover/src/Popover/Popover.spec.tsx * Refresh RTLOverrides * packages/toast/src/InternalToast/InternalToast.stories.tsx * fix render hook * Update ExpandedContent.spec.tsx * charts/core/src/ChartContext/ChartContext.spec.tsx * changesets * renderDescendantsTestContext * cleanup tooltip tests * bump popover-polyfill * fix ToggleEvent type import * test(date-picker): wrap timer advancement in waitFor * test(getAllPackages): ensure temporary directories * Creates R17 init script * Delete install-react17.ts * Update react17.yml * Update init.ts * cleanup tsconfigs * Update package.json * install lodash. rm gh-pages * init defaults deep * rm clean from init script * lint * feat: add lib exists type * lint exports * storyoobk addon typoe * chore: update react17 files * Delete init.ts * lint * add separate R17 build & test jobs * Squashed commit of the following: commit 87dc0b6 Author: Adam Thompson <[email protected]> Date: Wed Sep 10 13:22:33 2025 -0400 [LG-5490] chore: React17 compatibility (#3101) * Component compat * .ts compat * PolymorphicRenderFunctionReturnType * sync spec files * update Link & BackLink specs * Update useEchart.spec.ts * Update index.ts * Update FormField.spec.tsx * restore Popover.spec.tsx ts expect error * Update PasswordInput.spec.tsx * select spec * packages/table/src/utils/stories.testutils.tsx * sync ts files * @ts-ignore React18 * packages/popover/src/Popover/Popover.spec.tsx * Refresh RTLOverrides * packages/toast/src/InternalToast/InternalToast.stories.tsx * fix render hook * Update ExpandedContent.spec.tsx * charts/core/src/ChartContext/ChartContext.spec.tsx * changesets * renderDescendantsTestContext * cleanup tooltip tests * bump popover-polyfill * fix ToggleEvent type import * test(date-picker): wrap timer advancement in waitFor * test(getAllPackages): ensure temporary directories * chore(testing-lib): RTL overrides re-organization (#3114) * Updates internal structure of RTL overrides * Update rtl-overrides.md * fix git mv * Update hooks.spec.tsx * fix act * Squashed commit of the following: commit 87dc0b6 Author: Adam Thompson <[email protected]> Date: Wed Sep 10 13:22:33 2025 -0400 [LG-5490] chore: React17 compatibility (#3101) * Component compat * .ts compat * PolymorphicRenderFunctionReturnType * sync spec files * update Link & BackLink specs * Update useEchart.spec.ts * Update index.ts * Update FormField.spec.tsx * restore Popover.spec.tsx ts expect error * Update PasswordInput.spec.tsx * select spec * packages/table/src/utils/stories.testutils.tsx * sync ts files * @ts-ignore React18 * packages/popover/src/Popover/Popover.spec.tsx * Refresh RTLOverrides * packages/toast/src/InternalToast/InternalToast.stories.tsx * fix render hook * Update ExpandedContent.spec.tsx * charts/core/src/ChartContext/ChartContext.spec.tsx * changesets * renderDescendantsTestContext * cleanup tooltip tests * bump popover-polyfill * fix ToggleEvent type import * test(date-picker): wrap timer advancement in waitFor * test(getAllPackages): ensure temporary directories * no --frozen-lockfile * [LG-5354, LG-5461] fix(Polymorphic) Updates Polymorphic return types (#3111) * PolymorphicRenderFunctionReturnType * propTypes * tsdoc * Create poly-types.md * Update poly-types.md * Create poly-types.md * pkg json scripts * rename PolymorphicReturnType * Update Polymorphic.hooks.tsx * Update Polymorphic.hooks.tsx * rm pre-install step * Adds polymorphic tests to assert event type * fix: Fixes tests failing in React 17 (#3112) * Update r17-packages.json * Update transformToNestedData.spec.ts * Update DrawerToolbarContext.spec.tsx * Update Message.spec.tsx * WIP resizable * Update setup.js * useResizable * Update useScreenReaderAnnouncer.tsx * Update ProgressBar.spec.tsx * changeset * Update .changeset/progress-bar-strict.md * Update react17.yml * Update react17.yml * Update react17.yml * export isReact17 * Update transformToNestedData.spec.ts * Update transformToNestedData.spec.ts * rm cache: false * useDrawerToolbarContext tests * consistent queryByRole * Update Polymorphic.hooks.tsx * Update Polymorphic.hooks.tsx * WIP resizable * useResizable * Update react17.yml * Update react17.yml * Update react17.yml * Update transformToNestedData.spec.ts * rm cache: false * useDrawerToolbarContext tests * Create reset.mjs * Update package.json * reset yaml * Update reset.mjs * TK comments * fix defaults deep ordering * Update scripts/react17/init.mjs
✍️ Proposed changes
Updates ProgressBar
useScreenReaderAnnouncer
to deterministically return a consistent status message (primarily an concern in React 17 strict mode)Also:
renderHook
(Drawer, SectionNav)act
(useResizable)consoleOnce
assertion (Message)