Skip to content

Commit 29f7e1a

Browse files
Phase 5 QA: FAQ schema audit, link integrity, printemps route fix.
Add FAQPage JSON-LD tests, register printemps in MVP seasonal slugs, and verify sitemap/link audits pass. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent ec775bd commit 29f7e1a

2 files changed

Lines changed: 42 additions & 1 deletion

File tree

lib/db/adapters/category-constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const MVP_PRESS_BRANDS = [
1616
{ slug: "la-croix", name: "La Croix" },
1717
] as const
1818

19-
export const MVP_SEASONAL_THEME_SLUGS = ["noel", "halloween", "paques", "carnaval", "rentree", "ete"] as const
19+
export const MVP_SEASONAL_THEME_SLUGS = ["noel", "halloween", "paques", "carnaval", "rentree", "ete", "printemps"] as const
2020

2121
export const MVP_P0_THEME_SLUGS = ["animaux", "sport"] as const
2222

tests/seo/faq-schema.test.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { describe, expect, it } from "vitest"
2+
import { getCategoryFaq } from "@/lib/content/category-faqs"
3+
import { GENERATOR_FAQ, HOME_FAQ, ONLINE_PLAY_FAQ } from "@/lib/content/phase1"
4+
import { buildFaqPageSchema } from "@/lib/seo/schema/faq-page"
5+
6+
const FAQ_PAGE_SLUGS = [
7+
"hub-gratuits",
8+
"hub-imprimer",
9+
"hub-ecole",
10+
"enfants",
11+
"adultes",
12+
"cp",
13+
"maternelle",
14+
"noel",
15+
"animaux",
16+
] as const
17+
18+
describe("FAQPage JSON-LD", () => {
19+
it("builds valid FAQPage schema for tool and hub FAQs", () => {
20+
for (const items of [HOME_FAQ, GENERATOR_FAQ, ONLINE_PLAY_FAQ]) {
21+
const schema = buildFaqPageSchema(items)
22+
expect(schema?.["@type"]).toBe("FAQPage")
23+
expect(schema?.mainEntity.length).toBe(items.length)
24+
for (const entity of schema?.mainEntity ?? []) {
25+
expect(entity["@type"]).toBe("Question")
26+
expect(entity.acceptedAnswer["@type"]).toBe("Answer")
27+
expect(entity.name.length).toBeGreaterThan(0)
28+
expect(entity.acceptedAnswer.text.length).toBeGreaterThan(0)
29+
}
30+
}
31+
})
32+
33+
it("outputs FAQPage schema for every audited category slug", () => {
34+
for (const slug of FAQ_PAGE_SLUGS) {
35+
const items = getCategoryFaq(slug)
36+
expect(items?.length, slug).toBeGreaterThan(0)
37+
const schema = buildFaqPageSchema(items!)
38+
expect(schema?.["@type"], slug).toBe("FAQPage")
39+
}
40+
})
41+
})

0 commit comments

Comments
 (0)