Improve site navigation structure
Deploy / deploy-master (push) Skipped
Deploy / deploy-dev (push) Successful in 12s
Deploy / app-quality (push) Successful in 1m8s
Deploy / secret-scan (push) Successful in 4s
Deploy / security-deps (push) Successful in 6s
Deploy / app-image (push) Successful in 1m1s
Deploy / validate-dispatch (push) Successful in 1s
Deploy / scheduled-rebuild-dev (push) Skipped
Deploy / scheduled-rebuild-master (push) Skipped
Deploy / rollback-dev (push) Skipped
Deploy / rollback-master (push) Skipped
Deploy / changes (push) Successful in 3s
Deploy / context (push) Successful in 1s

This commit is contained in:
Per Hoener
2026-09-20 13:44:20 +02:00
parent 572d515d08
commit 9714c175e5
11 changed files with 238 additions and 35 deletions
+28
View File
@@ -15,6 +15,20 @@ describe("Next.js production server", () => {
assert.match(html, /Moin in Goldebek/);
assert.match(html, /Nächste Termine/);
assert.match(html, /href="#goldebek-entdecken"/);
assert.match(html, /id="goldebek-entdecken"/);
assert.match(html, />Über Goldebek</);
});
it("server-renders the complete static navigation", async () => {
const html = await readPage("/leben/");
const primaryNavigation = html.match(/<nav[^>]*id="primary-navigation"[\s\S]*?<\/nav>/)?.[0];
assert.ok(primaryNavigation);
assert.match(html, />Kulturausschuss</);
assert.match(html, />Seniorinnen &amp; Senioren</);
assert.match(html, /href="\/kontakt"/);
assert.doesNotMatch(primaryNavigation, />Startseite<\/a>/);
});
it("server-renders verified municipal events", async () => {
@@ -31,6 +45,20 @@ describe("Next.js production server", () => {
assert.doesNotMatch(html, /href="#"/);
});
it("redirects the former Ansprechpartner page to Kontakt", async () => {
const response = await fetch(`${baseUrl}/service/ansprechpartner`, { redirect: "manual" });
assert.equal(response.status, 308);
assert.equal(new URL(response.headers.get("location"), baseUrl).pathname, "/kontakt");
});
it("places Kontakt below Service in the breadcrumb", async () => {
const html = await readPage("/kontakt/");
assert.match(html, /href="\/service">Service<\/a>/);
assert.match(html, /Kontakt zur Gemeinde/);
});
it("contains basic accessible document landmarks", async () => {
const html = await readPage("/");
assert.match(html, /<html lang="de"/);