Repository navigation
Make the markdown-shortcuts and shadow-dom editing tests deterministic - #6205
Merged
Merged
Conversation
Both tests clicked the editor and then immediately drove the selection with keys: Home (or Cmd+Left), or Cmd/Ctrl+A. Slate reads a click's selection through a 100 ms throttle, so under load the click was sometimes applied after the keys and put the caret back where the mouse landed. Typing then went mid-line: "* " no longer made a list, and "Hello, Playwright!" landed inside the existing text. markdown-shortcuts now focuses the editor without a mouse position and selects the document start through the editor. shadow-dom uses the shared clearEditor helper instead of a keyboard select-all. On main the shadow-dom test failed 4 of 10 runs alone in Chromium, and markdown-shortcuts failed under parallel load. Both now pass 160 of 160 across all four projects with 8 workers.
|
This was referenced Oct 10, 2026
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.
Test-only. Fixes two integration tests that flake locally and keep showing up as "known failure on main" in PR notes.
Both tests clicked the editor and then immediately drove the selection with keys:
Home(orCmd+Left), orCmd/Ctrl+A. Slate reads a click's selection through a 100 ms throttle, so under load the click was sometimes applied after the keys and moved the caret back to where the mouse landed. Typing then went mid-line:*no longer made a list, andHello, Playwright!landed inside the existing text.markdown-shortcuts › can add list items: focuses the editor without a mouse position, selects the document start through the editor, and waits for the DOM caret before typing.shadow-dom › renders slate editor inside nested shadow and edits content: uses the sharedclearEditorhelper instead of a keyboard select-all.The full suite passes locally (263 passed, 0 failed), as do the strict checks on Node 24. No changeset, since only tests change.
A programmatic
editor.selectmade within 100 ms of a click can be overridden when the throttled click is processed. That's real but hard for a user to hit, so it's left alone here.