Skip to content

test: cover non-production, non-preview build wiring in e2e link-rewrite suite - #431

Merged
nate-double-u merged 5 commits into
mainfrom
quality/test-e2e-dev-build-wiring
Nov 20, 2026
Merged

nate-double-u merged 5 commits into
mainfrom
quality/test-e2e-dev-build-wiring

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds 2 assertions to the existing BUILD_ENV=dev describe block in e2e/linkRewrite.test.mjs, reusing its already-built output (no new build invocation):

  • asserts the edit-this-page link is omitted on a docs page
  • asserts og:url falls back to http://localhost:3000/

getBuildContext()'s 'neither production nor deploy-preview' branch (localhost url, omitted editUrl on both docs plugins) was unit-tested in isolation by lib/docusaurusConfigBuildContext.test.mts, but no real docusaurus build in 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

…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>
@hivecommons-hive hivecommons-hive Bot added the ready-for-review Hive's work is done; a maintainer reviews, then removes this label to let it merge. label Nov 19, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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 outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

The hive's work on this PR is done. Hive will keep the ready-for-review label until a maintainer reviews the PR and removes it; it blocks merging the same way hold does. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@netlify

netlify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cncf-techdocs ready!

Name Link
🔨 Latest commit 5d19793
🔍 Latest deploy log https://app.netlify.com/projects/cncf-techdocs/deploys/6affa3ca3f78a83962d0756c
😎 Deploy Preview https://deploy-preview-431--cncf-techdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally at head a8211b7; this looks correct to me.

  • Both new assertions reuse the existing BUILD_ENV=dev build in the before hook (e2e/linkRewrite.test.mjs:26-34), so no extra build invocation or CI time, as the body claims.
  • The doesNotMatch regex is non-vacuous: I ran a BUILD_ENV=production build of this tree and docs/assistance/index.html emits exactly href="https://github.com/cncf/techdocs/tree/main/docs/assistance.md", so a regression that re-enabled editUrl (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 emits https://cncf-techdocs.netlify.app/ there, confirming the field is actually wired through.
  • npm run test:e2e passes 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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:url uses http://localhost:3000/.
File Description
e2e/​linkRewrite.test.mjs Adds two assertions for dev-build edit-link and site-URL behavior.

Review effort: Balanced

@nate-double-u
nate-double-u enabled auto-merge (squash) November 20, 2026 01:32
@nate-double-u
nate-double-u merged commit deab42e into main Nov 20, 2026
9 checks passed
@nate-double-u
nate-double-u deleted the quality/test-e2e-dev-build-wiring branch November 20, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Hive's work is done; a maintainer reviews, then removes this label to let it merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants