Reference smoke test: drop the KNOWN 404 sitemap filter
ipal-kit now leaves the page assigned as 404 out of the sitemap (unlistedPageIds,
merged in 30c1015), so the smoke test checks every sitemap URL again. Verified:
seed, build and 15/15 Playwright smoke tests on a throwaway MongoDB.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
fd6eb293cb
commit
977872b0ad
@@ -68,10 +68,7 @@ for (const l of LOCALES) {
|
|||||||
|
|
||||||
test('every sitemap URL answers 200 with a title, canonical, hreflang and JSON-LD', async ({ page, request }) => {
|
test('every sitemap URL answers 200 with a title, canonical, hreflang and JSON-LD', async ({ page, request }) => {
|
||||||
const xml = await (await request.get('/sitemap.xml')).text()
|
const xml = await (await request.get('/sitemap.xml')).text()
|
||||||
// KNOWN plugin gap (reported 2026-10-29): the sitemap lists the page assigned as 404, which answers 404.
|
const urls = [...xml.matchAll(/<loc>([^<]+)<\/loc>/g)].map((m) => new URL(m[1]).pathname)
|
||||||
// Remove this filter when ipal-kit leaves the notFound page out of the sitemap.
|
|
||||||
const KNOWN_404 = ['/pl/nie-znaleziono', '/en/page-not-found']
|
|
||||||
const urls = [...xml.matchAll(/<loc>([^<]+)<\/loc>/g)].map((m) => new URL(m[1]).pathname).filter((p) => !KNOWN_404.includes(p))
|
|
||||||
expect(urls.length).toBeGreaterThan(20)
|
expect(urls.length).toBeGreaterThan(20)
|
||||||
for (const path of urls) {
|
for (const path of urls) {
|
||||||
const res = await page.goto(path)
|
const res = await page.goto(path)
|
||||||
|
|||||||
Reference in New Issue
Block a user