Skip to content

[pending ParakhAI-frontend#444] test: canonical/OG/Twitter meta tags - #14

Draft
saqibmanan wants to merge 1 commit into
mainfrom
test-sync/ParakhAI-frontend-pr444
Draft

saqibmanan wants to merge 1 commit into
mainfrom
test-sync/ParakhAI-frontend-pr444

Conversation

@saqibmanan

Copy link
Copy Markdown
Contributor

Pending: covers open CivicDataLab/ParakhAI-frontend#444 (head 237a68b). Skipped in CI until it merges. Safe to merge before it.

Source PR

CivicDataLab/ParakhAI-frontend#444 — "feat(seo): add canonical link tags and Open Graph meta tags" (open, base dev, created 2026-07-31, >72h old, no existing coverage).

What behaviour changes

app/layout.tsx currently exports a bare { title, description } metadata object. The PR adds:

  • metadataBase + alternates.canonical: "./" → an absolute <link rel="canonical"> on every page.
  • openGraph.{title,description,url,siteName,locale,type} → og:* meta tags.
  • twitter.{card,title,description} → a twitter:card meta tag.
  • A title.template so child routes get %s | ParakhAI (and drops the dashboard layout's now-redundant hardcoded suffix).

Category chosen

api (pure HTTP/HTML check via requests, no browser or login needed — the homepage / is one of the few routes not gated by the auth middleware). No other category fits: this isn't a user flow (e2e) and touches no security/perf-sensitive surface.

Red → green → skip proof

1. Collection under CI's real filter (pytest tests/api/ -m "api"):

tests/api/test_seo_metadata.py::TestSEOMetadata::test_homepage_has_canonical_link SKIPPED
tests/api/test_seo_metadata.py::TestSEOMetadata::test_homepage_has_open_graph_tags SKIPPED
tests/api/test_seo_metadata.py::TestSEOMetadata::test_homepage_has_twitter_card_tag SKIPPED
SKIPPED [3] tests/api/test_seo_metadata.py: pending_pr ParakhAI-frontend#444: not merged yet

2. RED — marker stripped, run against dev.parakh.civicdataspace.in (current/unmerged behaviour):

FAILED test_homepage_has_canonical_link — AssertionError: No <link rel="canonical"> tag found on the homepage
FAILED test_homepage_has_open_graph_tags — AssertionError: Missing Open Graph meta tags: ['og:title', 'og:description', 'og:url']
FAILED test_homepage_has_twitter_card_tag — AssertionError: No <meta name="twitter:card"> tag found on the homepage
3 failed

3. GREEN — marker stripped, PR head (237a68b) served locally (next dev, NEXT_PUBLIC_PLATFORM_URL=https://parakh.civicdatalab.in, stub Keycloak/NextAuth env since the homepage itself needs no session):

tests/api/test_seo_metadata.py::TestSEOMetadata::test_homepage_has_canonical_link PASSED
tests/api/test_seo_metadata.py::TestSEOMetadata::test_homepage_has_open_graph_tags PASSED
tests/api/test_seo_metadata.py::TestSEOMetadata::test_homepage_has_twitter_card_tag PASSED
3 passed

Confirmed the rendered HTML directly: <link rel="canonical" href="https://parakh.civicdatalab.in"/>, og:title/og:description/og:url/og:locale/og:type, and twitter:card=summary all present.

4. Marker restored — re-ran against dev, confirmed the same SKIPPED ... pending_pr ParakhAI-frontend#444: not merged yet as step 1.

Gaps / not covered

  • Per-route canonical URLs (/dashboard → .../dashboard) — not checked; the homepage check is the representative case and the dashboard route needs a session.
  • No og:image — the PR itself says this is deliberately out of scope (no suitably-sized asset exists yet; tracked as a separate issue on the source PR).
  • readonly: not applicable — this test only ever reads /, but it isn't marked readonly since the feature isn't on main/prod yet. Follow-up once #444 ships to prod.

Known edge (per pr-test-sync skill §9)

Merged isn't deployed: if dev's deploy fails its smoke gate after #444 merges and rolls back, this test will go red against the old page — that's a real signal, not a flake.


Generated by Claude Code

…rontend#444)

Covers CivicDataLab/ParakhAI-frontend#444 (open, dev, >72h old), which adds
canonical link, Open Graph and Twitter Card metadata to the homepage layout.
Gated with pending_pr so it skips in CI until that PR merges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant