-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[data grid] Tests broken in JSDOM with v7.16.0 #14517
Comments
@arminmeh could you have a look at this? |
Same here. I suspect this is related to this addition: https://github.com/mui/mui-x/pull/14293/files#diff-e1db53193a627d36d1cd3f651a954ee1e32ecb93caa020446631d722bb1be75cR293-R294. |
Premium customer here. Any news about the issue? Thanks in advance. Cheers, |
I'll raise this in the team channel ... will let you know here with an update later today! |
Hi all, I will take a look and update you soon |
@cruessler was right There is one more below the provided selection Issue occurs because of nwsapi which is being used by jsdom to validate selectors. There is an issue opened to address this. One of the options would be to replace these styles with the ones compatible with nwsapi, like these folks did. @mui/xgrid any suggestions? @KenanYusuf tagging you separately since you worked on this recently |
adding this to the board for further tracking of it! 👍🏼 |
Until you fix this, is there any workaround or should we wait for a new release? |
Hi @ddolcimascolo, I plan to make a fix for this in time for the next release later this week. I am not aware of any workarounds at the moment. |
Thanks, that's great news ! Cheers, |
I don't like that we keep having to pick suboptimal solutions to accomodate |
@romgrk Yeah, that sucks, but blocking people with a broken test pipeline sucks even more. |
I second this. While I totally agree Thanks a lot for your excellent support and for building such high quality products! Cheers, |
I wonder if we could find a way to signal to users they should consider moving to an alternative. At least https://github.com/capricorn86/happy-dom, if not a real headless browser. |
Fun fact, happy dom added support for |
Good to know. Happy-dom is maintained, so I expect it to evolve with browsers, unlike jsdom. |
We can add a testing page to MUI X docs (perhaps to Material UI docs too) to cover this.
I'm not sure we fully support happy-dom though (our conditions are jsdom-specific). But we should definitely support it 👍🏻 |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note We value your feedback @ddolcimascolo! How was your experience with our support team? |
Steps to reproduce
https://github.com/ddolcimascolo/mui-x-issue-14517
Current behavior
Tests fail with
SyntaxError: '+.MuiDataGrid-columnHeader:focus' is not a valid selector
❯ emit ../../node_modules/nwsapi/src/nwsapi.js:576:17
❯ _querySelectorAll ../../node_modules/nwsapi/src/nwsapi.js:1528:9
❯ Object._querySelector [as first] ../../node_modules/nwsapi/src/nwsapi.js:1437:14
❯ HTMLDivElementImpl.querySelector ../../node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js:69:44
❯ HTMLDivElement.querySelector ../../node_modules/jsdom/lib/jsdom/living/generated/Element.js:1094:58
❯ Array.Resolver ../../node_modules/nwsapi/src/nwsapi.js:781:17
❯ match_assert ../../node_modules/nwsapi/src/nwsapi.js:1364:13
❯ Object._matches [as match] ../../node_modules/nwsapi/src/nwsapi.js:1382:16
❯ exports.matchesDontThrow ../../node_modules/jsdom/lib/jsdom/living/helpers/selectors.js:29:36
❯ matches ../../node_modules/jsdom/lib/jsdom/living/helpers/style-rules.js:172:10
Expected behavior
Tests pass
Context
Upgrading mui-x from v7.15.0 to v7.16.0 through a Renovate PR
Your environment
npx @mui/envinfo
Search keywords: jsdom tests broken
Order ID: 31461
The text was updated successfully, but these errors were encountered: