test(docsite): add page-load smoke test that crawls every route#3740
Draft
cixzhang wants to merge 1 commit into
Draft
test(docsite): add page-load smoke test that crawls every route#3740cixzhang wants to merge 1 commit into
cixzhang wants to merge 1 commit into
Conversation
Boot the production server and visit every route from /sitemap.xml in a headless browser, failing on any uncaught page error, console.error, or non-OK document status. Routes are enumerated from the same generated registries that drive the pages, so new components, docs, templates, and blog posts are covered with no edits. Adds a pnpm test:smoke script backed by Playwright. The CI job that runs it is included in the PR description (workflow changes need a separate push scope).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
josephfarina
approved these changes
Jul 9, 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.
What
Adds a page-load smoke test for the docsite that catches the broad class of "a page white-screens / throws at runtime" regressions that the existing data-extraction unit tests and build-time type/lint checks can't see.
pnpm -F @astryxdesign/docsite test:smoke:next start)./sitemap.xml— the same generated registries (componentRegistry,docsRegistry,templateRegistry,blogRegistry) that drive the pages and the sitemap test — so new components, docs, templates, and blog posts are covered with no edits to the test.pageerror), orconsole.error.It also probes two routes the sitemap intentionally omits but that must still render:
/playground/previewand a deliberate 404 (to confirm the not-found page itself renders without throwing).Why
The docsite has ~260 routes, almost all client-rendered with StyleX + heavy client deps (Monaco, theme reels). A component-detail or doc page that throws only at render time passes
tsc,eslint, and the vitest data tests today — nothing exercises the actual rendered page. This closes that gap end to end.Files
apps/docsite/scripts/smoke-test.mjs— the crawler (standalone Node + Playwright, mirroring the existing.github/scripts/accessibility-audit.jspattern).apps/docsite/package.json—test:smokescript.apps/docsite/README.md— Testing docs.Verification
Ran the full server side locally against a production build: all 267 sitemap routes return clean (226×200, 41×307 intended redirects, zero 4xx/5xx). The headless-browser crawl half runs in CI where Chromium is available (the sandbox I authored this in blocks Playwright's browser CDN).
CI wiring (needs
workflowscope — please add)I couldn't push the workflow change (this token lacks
workflowscope). Please add this job to.github/workflows/ci.yml, right after the existingdocsite-testjob:Playwright is already a root devDependency (used by the
pr-a11yjob), so no new dependency is added.