Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WIP: Fix test warnings #1177

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

WIP: Fix test warnings #1177

wants to merge 5 commits into from

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.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant