Repository navigation
e2e: accept site JSON-LD alongside WebApplication block - #278
Merged
Merged
Conversation
PR #275 added a second site-wide @graph JSON-LD block to the prerendered landing, but this test still expected exactly one ld+json script. It has failed in CI since (run 174). The test now parses all ld+json blocks and asserts one of them is WebApplication. Verified locally: old test fails with Expected 1 / Received 2 against the production build; the updated test passes.
Strengthen instead of just relaxing: all ld+json blocks must parse (malformed JSON fails), exactly one WebApplication block is required (duplicates fail), and @context, name, https url and applicationCategory must be present. Verified locally against the production build: passes on current output, fails on a duplicated WebApplication block, fails on malformed JSON.
Owner
Author
|
Amended to strengthen the assertions rather than only relax them. The test now requires:
Verified locally against the production build ( |
manav4u
marked this pull request as ready for review
November 7, 2026 17:51
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
Updates one e2e expectation in
e2e/landing.spec.ts("ships WebApplication JSON-LD"). Test-only change; no app, landing, or workflow code touched.Why
PR #275 (5 Nov) intentionally added a site-wide
@graphJSON-LD block to the prerendered landing, so the page now ships twoapplication/ld+jsonscripts: the originalWebApplicationblock and the new site graph. This test still expected exactly one, and has failed in CI since (PR checks run 174 on #275 failed the same way; every main build since carries both blocks).Evidence, reproduced locally against the production build (
npm run build+npm run preview):toHaveCount— Expected: 1, Received: 2 (same failure as CI run on Remove dead Supabase env vars from deploy workflow #277).ld+jsonblocks and asserts one of them is@type: 'WebApplication'.The
WebApplicationblock itself is unchanged and still present; this only stops the test from rejecting the intentional second block.