From 1a114e7afbe7a3e4516ce9a34301a48fb932b07b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Sep 2026 15:03:57 +0000 Subject: [PATCH] chore: sync storefront from monorepo Source: coded-letter/coded-letter-monorepo@f4c8428af30807dd959566ae4397acf5914d0ffb --- apps/storefront/scripts/seo-metadata.test.mjs | 19 ++++++++++++++++++- packages/ui/src/seo/Seo.tsx | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/apps/storefront/scripts/seo-metadata.test.mjs b/apps/storefront/scripts/seo-metadata.test.mjs index de2327c..79a42d1 100644 --- a/apps/storefront/scripts/seo-metadata.test.mjs +++ b/apps/storefront/scripts/seo-metadata.test.mjs @@ -1,6 +1,7 @@ import assert from "node:assert/strict"; import { readFile } from "node:fs/promises"; import test from "node:test"; +import { JSDOM } from "jsdom"; const appRoot = new URL("../", import.meta.url); @@ -42,7 +43,7 @@ test("prerender emits complete CMS metadata in the first document response", asy test("client SEO removes generated metadata without restoring stale tags", async () => { const seo = await readFile(new URL("../../packages/ui/src/seo/Seo.tsx", appRoot), "utf8"); - assert.match(seo, /querySelectorAll\([\s\S]*data-storefront-seo/); + assert.match(seo, /querySelectorAll\([\s\S]*data-storefront-seo\]:not\(\[data-rh\]\)/); assert.doesNotMatch(seo, /insertBefore\(element/); assert.match(seo, /image\?\.url \|\| opengraphImage/); assert.match(seo, /property="og:image:alt"/); @@ -50,6 +51,22 @@ test("client SEO removes generated metadata without restoring stale tags", async assert.match(seo, /name="twitter:image:alt"/); }); +test("client SEO cleanup preserves prerendered titles adopted by Helmet", () => { + const dom = new JSDOM(`
+