From cc6e4d1bce55b3fd1bb9c1ad74ea56015198b236 Mon Sep 17 00:00:00 2001 From: "user.email" <257724087+nish3451@users.noreply.github.com> Date: Wed, 12 Aug 2026 02:53:47 +0530 Subject: [PATCH] test: guard methodology /check mentions stay clickable, never plain text The scout item (plain-text /check on /methodology) was already fixed by #90, but no test failed if a plain-text mention regressed back in. Add a guard asserting every /check mention on the methodology page is a link href or a link's anchor text. --- worker/routes/pages.test.mjs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/worker/routes/pages.test.mjs b/worker/routes/pages.test.mjs index b7c21a0c..3a48086f 100644 --- a/worker/routes/pages.test.mjs +++ b/worker/routes/pages.test.mjs @@ -46,6 +46,21 @@ test("public proof pages expose methodology and package ladder without overclaim new RegExp(`Check one page now`), "methodology must carry a clickable CTA into the anonymous one-page check" ); + // Scout regression guard: every mention of the anonymous check URL on the + // methodology page must be clickable (a link href or a link's anchor text), + // never printed as plain text. + { + const checkUrl = `${origin}/check`; + const totalMentions = methodology.split(checkUrl).length - 1; + const hrefMentions = methodology.split(`href="${checkUrl}"`).length - 1; + const linkTextMentions = methodology.split(`>${checkUrl}<`).length - 1; + assert.ok(totalMentions > 0, "methodology must mention the anonymous one-page check"); + assert.equal( + totalMentions, + hrefMentions + linkTextMentions, + `every /check mention on the methodology page must be a clickable link (${totalMentions} mentions, ${hrefMentions} link hrefs, ${linkTextMentions} link texts)` + ); + } assert.match(methodology, /Why not just use a free AI SEO agent skill\?/); assert.match(methodology, /Open-source SEO tooling is good at that/, "the free-skill answer must not disparage open source"); assert.match(methodology, /no live AI-engine sampling, no AI citation monitoring, and no ranking guarantees/i);