Skip to content

test: fix flaky decorator test in Firefox#2400

Merged
christianhg merged 1 commit intomainfrom
fix/flaky-decorator-test-firefox
Mar 20, 2026
Merged

test: fix flaky decorator test in Firefox#2400
christianhg merged 1 commit intomainfrom
fix/flaky-decorator-test-firefox

Conversation

@christianhg
Copy link
Member

The "Splitting block before decorator" scenario uses {ArrowUp} to navigate to the previous block after pressing Enter. In headless Firefox CI, the ArrowUp selection change can be slow or unreliable, causing the test to proceed before the cursor has actually moved. This results in "bar" being inserted into the wrong block.

Replace ArrowUp with a programmatic the caret is put after "" which targets the empty first block directly. The test is verifying decorator preservation across block splits, not arrow key navigation.

@vercel
Copy link

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
portable-text-editor-documentation Ready Ready Preview, Comment Mar 20, 2026 10:15am
portable-text-example-basic Ready Ready Preview, Comment Mar 20, 2026 10:15am
portable-text-playground Ready Ready Preview, Comment Mar 20, 2026 10:15am

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2026

⚠️ No Changeset found

Latest commit: b9006c2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2026

📦 Bundle Stats — @portabletext/editor

Compared against main (ef2c7219)

@portabletext/editor

Metric Value vs main (ef2c721)
Internal (raw) 753.2 KB -
Internal (gzip) 141.5 KB -
Bundled (raw) 1.36 MB -
Bundled (gzip) 304.4 KB -
Import time 99ms -1ms, -0.6%

@portabletext/editor/behaviors

Metric Value vs main (ef2c721)
Internal (raw) 467 B -
Internal (gzip) 207 B -
Bundled (raw) 424 B -
Bundled (gzip) 171 B -
Import time 6ms +0ms, +1.6%

@portabletext/editor/plugins

Metric Value vs main (ef2c721)
Internal (raw) 2.5 KB -
Internal (gzip) 910 B -
Bundled (raw) 2.3 KB -
Bundled (gzip) 839 B -
Import time 12ms +0ms, +1.0%

@portabletext/editor/selectors

Metric Value vs main (ef2c721)
Internal (raw) 60.2 KB -
Internal (gzip) 9.4 KB -
Bundled (raw) 56.7 KB -
Bundled (gzip) 8.6 KB -
Import time 10ms +0ms, +2.1%

@portabletext/editor/utils

Metric Value vs main (ef2c721)
Internal (raw) 24.2 KB -
Internal (gzip) 4.7 KB -
Bundled (raw) 22.2 KB -
Bundled (gzip) 4.4 KB -
Import time 9ms +0ms, +0.4%

🗺️ . · ./behaviors · ./plugins · ./selectors · ./utils · Artifacts

Details
  • Import time regressions over 10% are flagged with ⚠️
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

Remove unreliable ArrowUp navigation and typing step. The test now
verifies the split result directly: after pressing Enter before a
decorated word, both the new empty block and the original block
retain the decorator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant