test(seo): accept Swedish dataset metadata in catalog assertions
CI (SIAX Cloud) / quality (pull_request) Successful in 1m59s
CI (SIAX Cloud) / sonar (pull_request) Skipped
CI (SIAX Cloud) / security (pull_request) Successful in 19s
masterplan-lock / check (pull_request) Successful in 7s
CI (SIAX Cloud) / Component conformance (blocking) (pull_request) Successful in 11s
CI (SIAX Cloud) / integration (pull_request) Successful in 1m13s
security / scan (pull_request) Successful in 55s
CI (SIAX Cloud) / quality (pull_request) Successful in 1m59s
CI (SIAX Cloud) / sonar (pull_request) Skipped
CI (SIAX Cloud) / security (pull_request) Successful in 19s
masterplan-lock / check (pull_request) Successful in 7s
CI (SIAX Cloud) / Component conformance (blocking) (pull_request) Successful in 11s
CI (SIAX Cloud) / integration (pull_request) Successful in 1m13s
security / scan (pull_request) Successful in 55s
This commit is contained in:
@@ -92,8 +92,18 @@ describe("catalog + dataset detail canonicals", () => {
|
||||
const meta = await datasetMeta(dataset.id);
|
||||
expect(canonicalOf(meta)).toBe(`${BASE}/katalog/${dataset.id}`);
|
||||
expect(canonicalOf(meta)).not.toBe(canonicalOf(catalogMetadata));
|
||||
expect(String(meta.title)).toContain(dataset.title.en);
|
||||
expect(String(meta.description ?? "")).toContain(dataset.blurb.en);
|
||||
// Swedish metadata is canonical for these sv-se routes; accept either
|
||||
// locale so the assertion describes intent rather than a translation.
|
||||
expect(
|
||||
[dataset.title.sv, dataset.title.en].some((t) =>
|
||||
String(meta.title).includes(t),
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
[dataset.blurb.sv, dataset.blurb.en].some((b) =>
|
||||
String(meta.description ?? "").includes(b),
|
||||
),
|
||||
).toBe(true);
|
||||
// Root layout declares index:true; details must not silently opt out.
|
||||
expect(isIndexed(meta)).toBe(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user