Skip to content

test(website): read the rendered docs heading in the React docs parity spec - #1612

Queued
blove wants to merge 1 commit into
mainfrom
blove/react-docs-parity-h1-flake
Queued

blove wants to merge 1 commit into
mainfrom
blove/react-docs-parity-h1-flake

Conversation

@blove

@blove blove commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Summary

apps/website/e2e/react-docs-parity.spec.ts ("framework switching and shared pages keep the docs reading theme") failed intermittently in "Website — e2e (control-plane)", most recently on the first CI attempt of #1609, with a strict-mode violation: locator('h1') resolved to two elements on /docs/choosing-an-adapter.

Cause

The e2e job serves the site with next dev. In development MdxRenderer wraps the article in a Suspense boundary, so the article streams after the shell. For a moment the streamed copy still sits in React's hidden segment holder (S:0) while the workspace shell already shows its own copy. A probe recorded this on 3 of 12 loads, for about 20 ms each:

342ms shell:vis,hiddenHolder#S:0:novis
364ms shell:vis

A strict locator throws as soon as it sees two matches, so the window does not have to last. A visitor never sees the hidden copy, and production does not render the boundary.

Change

The spec looks the heading up by role and name, which reads rendered elements only. No product code changes.

Verification

  • Before: the unmodified test failed 2 of 15 runs against a local next dev server with the same strict-mode violation.
  • After: 40 of 40 runs pass against the same server.
  • npx nx lint website passes.

Not run: the full website e2e suite locally; CI covers it.

🤖 Generated with Claude Code

…y spec

Under next dev the article streams behind a Suspense boundary, so for a
moment its copy in React's hidden segment holder exists beside the one the
workspace shell shows. A bare h1 locator then matched two elements and
failed in strict mode. Look the heading up by role, which skips the hidden
copy.
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
threadplane Ready Ready Preview Nov 16, 2026 5:08am UTC

Request Review

@blove
blove enabled auto-merge November 16, 2026 05:30
@blove
blove added this pull request to the merge queue Nov 16, 2026
Any commits made after this event will not be merged.

This branch was successfully deployed

1 active deployment
Preview – threadplane — 8181c1d7 Deployed Nov 16, 2026 by vercel[bot]
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