diff --git a/scripts/check_app_discovery_live.sh b/scripts/check_app_discovery_live.sh index 9a7c8f27..a77550dd 100644 --- a/scripts/check_app_discovery_live.sh +++ b/scripts/check_app_discovery_live.sh @@ -104,7 +104,7 @@ fetch '/support/debate-me/' 'debate-me.html' # title prevents a GitHub merge from being mistaken for a published change. grep -Fq 'Debate Me: AI Debate Practice App for Android | SK APPS' "$tmp/debate-me.html" || { echo 'FAIL Debate Me new SEO title not live' >&2; exit 1; } grep -Fq 'content="Practice debates against an AI opponent in Debate Me for Android' "$tmp/debate-me.html" || { echo 'FAIL Debate Me new search description not live' >&2; exit 1; } -grep -Fq '' "$tmp/debate-me.html" || { echo 'FAIL Debate Me OG title not live' >&2; exit 1; } +grep -Fq '' "$tmp/debate-me.html" || { echo 'FAIL Debate Me OG title not live' >&2; exit 1; } grep -Fq 'data-position="hero"' "$tmp/debate-me.html" || { echo 'FAIL Debate Me first-screen Play CTA not live' >&2; exit 1; } grep -Fq 'data-position="details"' "$tmp/debate-me.html" || { echo 'FAIL Debate Me details Play CTA missing' >&2; exit 1; } grep -Fq 'support_debate_me_hero' "$tmp/debate-me.html" || { echo 'FAIL Debate Me Play attribution missing' >&2; exit 1; } diff --git a/scripts/test_live_smoke_metadata_contract.cjs b/scripts/test_live_smoke_metadata_contract.cjs new file mode 100644 index 00000000..9aedb118 --- /dev/null +++ b/scripts/test_live_smoke_metadata_contract.cjs @@ -0,0 +1,27 @@ +'use strict'; +const test = require('node:test'); +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); +const root = path.join(__dirname, '..'); + +test('production smoke checks actual Debate Me SEO and OG metadata', () => { + const html = fs.readFileSync(path.join(root, 'support/debate-me/index.html'), 'utf8'); + const smoke = fs.readFileSync(path.join(__dirname, 'check_app_discovery_live.sh'), 'utf8'); + const pageTitle = html.match(/([^<]+)<\/title>/); + const ogTitle = html.match(/<meta property="og:title" content="([^"]+)">/); + assert.ok(pageTitle); + assert.ok(ogTitle); + assert.ok(smoke.includes('<title>' + pageTitle[1] + '')); + assert.ok(smoke.includes('')); + assert.notEqual(pageTitle[1], ogTitle[1], 'separate SEO and sharing titles must not be conflated'); +}); + +test('deploy smoke retains source truth and five-locale gate', () => { + const smoke = fs.readFileSync(path.join(__dirname, 'check_app_discovery_live.sh'), 'utf8'); + assert.ok(smoke.includes("fetch '/support/debate-me/' 'debate-me.html'")); + assert.ok(smoke.includes("fetch '/apps' 'apps.html'")); + assert.ok(smoke.includes("for language in en ja es pt-BR id")); + assert.ok(smoke.includes('catalog_language_selected')); + assert.ok(!smoke.includes('rsync ')); +});