This repository was archived by the owner on Oct 12, 2026. It is now read-only.
Repository navigation
fix(public): verify the shared footer copy in the live deploy acceptance #97
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5c99578
fix(public): verify the shared footer copy in the live deploy acceptance
nish3451 359b99c
Merge branch 'main' into fix/lane1-live-footer-copy-guard
nish3451 0e4332d
Merge branch 'main' into fix/lane1-live-footer-copy-guard
nish3451 ab7f4fb
Merge branch 'main' into fix/lane1-live-footer-copy-guard
nish3451 624c8d1
Merge branch 'main' into fix/lane1-live-footer-copy-guard
nish3451 e30dace
Merge branch 'main' into fix/lane1-live-footer-copy-guard
nish3451 63730a6
Merge branch 'main' into fix/lane1-live-footer-copy-guard
nish3451 ccb83d5
Merge remote-tracking branch 'origin/main' into fix/lane1-live-footer…
nish3451 35fd0a8
Merge origin/main into fix/lane1-live-footer-copy-guard
nish3451 21412ed
Merge origin/main into fix/lane1-live-footer-copy-guard
nish3451 147df80
Merge origin/main into fix/lane1-live-footer-copy-guard
nish3451 90111bd
Merge branch 'main' into fix/lane1-live-footer-copy-guard
nish3451 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -173,6 +173,69 @@ try { | |
| } | ||
| } | ||
| } | ||
| console.log("H. shared-footer pages carry visitor-facing footer copy, not launch-prep (PR #35)") | ||
| { | ||
| // Same coverage and markers as scripts/test-public-footer-copy.mjs: every | ||
| // live path that carries the shared footer block must name the actual | ||
| // products and must not contain any fragment of the launch-prep footer | ||
| // line the June-20 bundle still serves. | ||
| const FOOTER_PATHS = [ | ||
| "/contact/", | ||
| "/drishti/", | ||
| "/drishti/privacy/", | ||
| "/drishti/support/", | ||
| "/privacy-choices/", | ||
| "/privacy/", | ||
| "/promptly/", | ||
| "/promptly/privacy/", | ||
| "/promptly/support/", | ||
| "/support/", | ||
| "/terms/", | ||
| ] | ||
| const LAUNCH_PREP_FRAGMENTS = [ | ||
| "clean public foundation", | ||
| "foundation before launch", | ||
| "gives each product", | ||
| "before launch", | ||
| ] | ||
| const VISITOR_FACING_FRAGMENTS = ["Promptly", "Drishti"] | ||
|
|
||
| const footerBlockOf = (html) => { | ||
| const start = html.indexOf("<footer") | ||
| const end = html.indexOf("</footer>") | ||
| return start >= 0 && end > start ? html.slice(start, end) : "" | ||
| } | ||
|
|
||
| const checkFooter = (label, html) => { | ||
| const footer = footerBlockOf(html) | ||
| ok(footer.length > 0, `${label} has a footer block`) | ||
| const copyBlock = footer.match(/<p class="footer-copy"[^>]*>([\s\S]*?)<\/p>/) | ||
| ok(copyBlock !== null, `${label} has a .footer-copy paragraph`) | ||
| if (copyBlock) { | ||
| const copy = copyBlock[1] | ||
| for (const fragment of VISITOR_FACING_FRAGMENTS) { | ||
| ok(copy.includes(fragment), `${label} footer copy names ${fragment}`) | ||
| } | ||
| for (const fragment of LAUNCH_PREP_FRAGMENTS) { | ||
| ok(!copy.includes(fragment), `${label} footer copy avoids "${fragment}"`) | ||
|
Comment on lines
+229
to
+230
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If a deployed footer contains a capitalization variant such as Useful? React with 👍 / 👎. |
||
| } | ||
| } | ||
| for (const fragment of LAUNCH_PREP_FRAGMENTS) { | ||
| ok(!footer.includes(fragment), `${label} footer has no "${fragment}"`) | ||
| } | ||
| } | ||
|
|
||
| for (const path of FOOTER_PATHS) { | ||
| const { status, body } = await get(path) | ||
| ok(status === 200, `${path} returns 200 (got ${status})`) | ||
| checkFooter(path, body) | ||
| } | ||
| const footerProbe = `/definitely-missing-footer-probe-${Date.now()}` | ||
| const { status, body } = await get(footerProbe) | ||
| ok(status === 404, `unknown URL returns 404 for footer probe (got ${status})`) | ||
| checkFooter("404 page", body) | ||
| } | ||
|
|
||
| } catch (error) { | ||
| failures++ | ||
| console.error(` FAIL live request error: ${error.message}`) | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a shared footer remains semantically unchanged but its attributes are reordered, use single quotes, or add another class (for example,
<p style="..." class="footer-copy">), this regex fails to recognize the paragraph and blocks the post-deploy release lane. Match the class attribute regardless of attribute order and quoting, or parse the footer as HTML, so valid markup refactors do not produce a false deployment failure.Useful? React with 👍 / 👎.