Skip to content
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

Automated tests throw "TypeError: highlightItem.scrollIntoView is not a function" #2616

Closed
kalinkrustev opened this issue Jan 29, 2022 · 0 comments · Fixed by #2617
Closed
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@kalinkrustev
Copy link
Contributor

I'm submitting a ... (check one with "x")

[x] bug report

Codesandbox Case (Bug Reports)
https://codesandbox.io/s/treeselect-toxz7?file=/src/index.test.js

Current behavior
Running tests with jest and @testing-library/react trigger this error for components like Dropdown, MultiSelect, TabView and TreeSelect
This is likely related to jsdom/jsdom#1695 and there is a workaround explained here https://stackoverflow.com/a/53294906/1205028

Expected behavior
Error should not be thrown and workarounds should not be needed.

Minimal reproduction of the problem with instructions
Open the sandbox link, click the tests, then click the console where the error is shown.

  • PrimeReact version:
    7.2.0
@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Feb 17, 2022
@mertsincan mertsincan added this to the 7.2.1 milestone Feb 17, 2022
mertsincan pushed a commit that referenced this issue Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants