Skip to content

Conversation

@chrisroos
Copy link

No description provided.

This removes the following warnings we're seeing when running the tests:

    Warning: `ReactDOMTestUtils.act` is deprecated in favor of `React.act`.
    Import `act` from `react` instead of `react-dom/test-utils`. See
    https://react.dev/warnings/react-dom-test-utils for more info.

I initially attempted to upgrade to the latest version of
@testing-library/react (16.2.0) but that introduces other problems so
I'll stick with this for now.
    Warning: Failed prop type: The prop `children` is marked as required in
    `ResizableWithHandle`, but its value is `undefined`.  at children
    (/home/chrisroos/Code/rpf/editor-ui/src/utils/ResizableWithHandle.js:42:11)
This avoids the following warning. Although the test setup adds a div
with id of "app", that's not in the dom at the point the InputModal
attempts to find it with `document.querySelector("#app")` and
`document.getElementById("app")`.

  console.error
    Warning: react-modal: App element is not defined. Please use `Modal.setAppElement(el)` or set `appElement={el}`. This is needed so screen readers don't see main content when modal is opened. It is not recommended, but you can opt-out by setting `ariaHideApp={false}`.
This commit identifies all the tests that emit warnings and/or errors. I
intend to work through them to fix the warnings/errors properly and then
I can remove this commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants