Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d1c7d66:
|
|
I can update babel separately and fix the transform errors. EDIT: #17897 |
|
Bad news: custom css properties are still not working using jsdom |
can use a custom env to get jsdom 16 in, if needed: https://www.npmjs.com/package/jest-environment-jsdom-sixteen |
|
@SimenB SimenB#837 should include all fixes to make JSDOM happy. @trueadm might want to take a look at the change Drag-Test.internal |
|
Can you link me to the change you’re referring to? Thanks :) |
packages/react-interactions/events/src/dom/__tests__/Drag-test.internal.js
Outdated
Show resolved
Hide resolved
packages/react-interactions/events/src/dom/__tests__/Drag-test.internal.js
Outdated
Show resolved
Hide resolved
packages/react-interactions/events/src/dom/__tests__/Drag-test.internal.js
Outdated
Show resolved
Hide resolved
As I said it's probably something with JSDOM supporting passive event listeners (see SimenB#837 (comment)) |
|
Let me look at changing the Drag tests quickly. Maybe that will help. Update: done in #17896 |
packages/react-dom/src/events/__tests__/ChangeEventPlugin-test.internal.js
Show resolved
Hide resolved
|
It would also be good to know why all the click events were changed from MouseEvents to .click(). Is this another breaking change in JSDOM? |
I took all the time to no only fix it, but prepare a PR, annoate changes and prepare codesandboxes with actual browser behavior. Could you respond to these statements instead? It's not clear if I didn't communicate them well enough or if you just ignored them. |
|
Yeah it's helpful if the context goes into the PR summary. We don't usually expect context to be found in a PR against another repo. |
|
@eps1lon Sorry if I wasn't clear. I wasn't criticising your work – this is all awesome! I believe I'm also missing the context to the original code somewhere – I can't see any codesandboxes or comments in this PR? I don't see anything in this PR's summary about any of this. I also wrote the above comment, before your above comments to @necolas, which help expand and clarify on points. |
|
I updated the PR summary with the relevant context behind the changes |
| <div | ||
| style={{ | ||
| lineClamp: 10, | ||
| WebkitLineClamp: 10, |
There was a problem hiding this comment.
Not sure why we have this. lineClamp isn't a valid CSS property...
|
If you could please rebase this on top of latest master, it looks good to me. |
|
I won't be at a computer for a few hours, so if you could rebase that'd be sweet. If not I'll get to it later 🙂 |
|
Never got to it yesterday, but rebased now! 👍 |
|
Wow this is great, thank you! Leaving for @necolas to merge. |
This reverts commit cf00812. The changes to the test code relate to changes in JSDOM that come with Jest 25: * Several JSDOM workarounds are no longer needed. * Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers. * https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh * JSDOM no longer triggers default actions when dispatching click events. * https://codesandbox.io/s/beautiful-cdn-ugn8f * JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent. * JSDOM now supports passive events. * JSDOM has improved support for custom CSS properties. * But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.
|
Heads up, I'm reverting this in #18376 because of a Jest bug that is fixed in master but unreleased: jestjs/jest#9575 |
This reverts commit cf00812. The changes to the test code relate to changes in JSDOM that come with Jest 25: * Several JSDOM workarounds are no longer needed. * Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers. * https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh * JSDOM no longer triggers default actions when dispatching click events. * https://codesandbox.io/s/beautiful-cdn-ugn8f * JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent. * JSDOM now supports passive events. * JSDOM has improved support for custom CSS properties. * But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.
This reverts commit cf00812. The changes to the test code relate to changes in JSDOM that come with Jest 25: * Several JSDOM workarounds are no longer needed. * Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers. * https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh * JSDOM no longer triggers default actions when dispatching click events. * https://codesandbox.io/s/beautiful-cdn-ugn8f * JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent. * JSDOM now supports passive events. * JSDOM has improved support for custom CSS properties. * But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.
This reverts commit cf00812. The changes to the test code relate to changes in JSDOM that come with Jest 25: * Several JSDOM workarounds are no longer needed. * Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers. * https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh * JSDOM no longer triggers default actions when dispatching click events. * https://codesandbox.io/s/beautiful-cdn-ugn8f * JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent. * JSDOM now supports passive events. * JSDOM has improved support for custom CSS properties. * But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.
This reverts commit fc7835c.
Summary
The changes to the test code relate to changes in JSDOM that come with Jest 25:
setAttributecalls) that JSDOM has now patched to match browsers.focus()on an already focused element does not dispatch aFocusEvent.Closes #17012
Test Plan
yarn test