Repository navigation
test: cover non-production, non-preview build wiring in e2e link-rewrite suite - #431
Conversation
…ite suite getBuildContext()'s localhost-url/omitted-editUrl branch (neither BUILD_ENV=production nor a deploy-preview DEPLOY_PRIME_URL) is unit-tested in isolation by lib/docusaurusConfigBuildContext.test.mts, but no build in e2e/linkRewrite.test.mjs asserted that the existing BUILD_ENV=dev build actually renders that branch's output. The production (BUILD_ENV=production) and deploy-preview branches already gained e2e coverage in #428 and #426 respectively; this closes the remaining third branch using the suite's existing build output. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
Important Ready for review: held for a maintainer by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3-L5; an The hive's work on this PR is done. Hive will keep the |
✅ Deploy Preview for cncf-techdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Verified locally at head a8211b7; this looks correct to me.
- Both new assertions reuse the existing
BUILD_ENV=devbuild in thebeforehook (e2e/linkRewrite.test.mjs:26-34), so no extra build invocation or CI time, as the body claims. - The
doesNotMatchregex is non-vacuous: I ran aBUILD_ENV=productionbuild of this tree anddocs/assistance/index.htmlemits exactlyhref="https://github.com/cncf/techdocs/tree/main/docs/assistance.md", so a regression that re-enablededitUrl(docusaurus.config.ts:71) in dev builds would trip this assertion. - The og:url assertion matches the
isProd ? ... : 'http://localhost:3000'fallback at docusaurus.config.ts:30-32; the production build emitshttps://cncf-techdocs.netlify.app/there, confirming the field is actually wired through. npm run test:e2epasses 5/5 on this head.
One optional nit, not a defect: the enclosing describe is still named "production build applies the link-rewrite plugins end-to-end" while it runs with BUILD_ENV=dev; that name predates this PR, but with dev-branch assertions now living inside it a rename would help the next reader. Fine to leave for a follow-up.
No duplicate overlap with #426 (deploy-preview branch) or #428 (production branch); each targets a different getBuildContext() branch.
-- hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the added dev-build link-rewrite assertions.
No open issues 🎉
What changed in this PR
Extends the link-rewrite end-to-end suite to cover default/dev build output, complementing the production and deploy-preview coverage in #428 and #426. The tests reuse the existing BUILD_ENV=dev build; no production code changes or additional builds are introduced.
Changes:
- Checks that a docs page omits the edit-this-page link.
- Checks that the homepage’s
og:urluseshttp://localhost:3000/.
| File | Description |
|---|---|
e2e/linkRewrite.test.mjs |
Adds two assertions for dev-build edit-link and site-URL behavior. |
Review effort: Balanced
Test Improvement
Adds 2 assertions to the existing
BUILD_ENV=devdescribe block ine2e/linkRewrite.test.mjs, reusing its already-built output (no new build invocation):og:urlfalls back tohttp://localhost:3000/getBuildContext()'s 'neither production nor deploy-preview' branch (localhosturl, omittededitUrlon both docs plugins) was unit-tested in isolation bylib/docusaurusConfigBuildContext.test.mts, but no realdocusaurus buildin the e2e suite asserted that branch's rendered output. #428 added e2e coverage for the production branch and #426 for the deploy-preview branch; this completes the third (default/dev) branch using the suite's existing build, so it adds no new build invocation or CI time.Related Issue
None (not scoped to a filed issue; a disjoint coverage gap found while surveying existing open e2e PRs #426/#428 for overlap before choosing new work).
Filed by quality agent (hold-gated mode). Human review required.
-- hive: agent=quality backend=copilot model=claude-opus-4-6 copilot=1.0.88