test: identify browser/jsdom differences#1091
Merged
ph-fritsche merged 17 commits intomainfrom Jan 12, 2025
Merged
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. |
Codecov Report
@@ Coverage Diff @@
## main #1091 +/- ##
=======================================
Coverage 99.46% 99.47%
=======================================
Files 92 92
Lines 2070 2085 +15
Branches 714 706 -8
=======================================
+ Hits 2059 2074 +15
Misses 11 11
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
3 tasks
5217161 to
100aa83
Compare
|
🎉 This PR is included in version 14.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What:
Identify the differences between Chrome and Jsdom environment.
Why:
Determine if failing tests in Chrome are the result of wrong assumptions in our tests or wrong implementations in our source.
Checklist:
Findings:
Some of our tests rely on Jsdom-specific behavior and in at least one case the browser implementation has changed.
I've added TODOs (either in test or source) where i could identify the cause of different results in the test environments.
Any new discoveries of differences between Jsdom and Chrome should be added to
tests/environmentso that we can easily keep track of the quirks.prepareElementis triggered byfocus. Therefore we fail to track any UI value/selection in browsers.user-event/src/event/focus.ts
Lines 5 to 6 in 57c9b65
Selectionwhen<input/>inside contenteditable is focused #1248user-event/src/event/selection/updateSelectionOnFocus.ts
Lines 3 to 6 in a76db96
DataTransferItem.getAsString()breaks Clipboard methods #1249user-event/src/utils/dataTransfer/DataTransfer.ts
Line 160 in 5d0dcaf
createDataTransferfails to override realDataTransfer.types.With
filesparameter the method has only been used internally in our tests.user-event/tests/utils/dataTransfer/DataTransfer.ts
Lines 49 to 52 in 98bc5e0
user-event/tests/utils/edit/setFiles.ts
Lines 44 to 48 in 5057e39