Test: implement header, footer und Nav everywhere in *.test.ts

This commit is contained in:
ISA
2025-09-11 11:32:09 +02:00
parent 538f9ca487
commit bdaf0ec263
7 changed files with 23 additions and 8 deletions

View File

@@ -8,11 +8,20 @@ export async function footerTest(page: Page) {
const footer = page.getByRole("contentinfo");
await expect(footer).toBeVisible();
await expect(footer.getByText(/Littwin Systemtechnik GmbH/)).toBeVisible();
await expect(footer.getByText(/Telefon: 04402 972577/)).toBeVisible();
await expect(
footer.getByText(/kontakt@littwin-systemtechnik\.de/)
footer.getByText("Littwin Systemtechnik GmbH & Co. KG")
).toBeVisible();
await expect(footer.getByText("Telefon: 04402 972577-0")).toBeVisible();
await expect(
footer.getByText("kontakt@littwin-systemtechnik.de")
).toBeVisible();
// Exaktes Label im Footer, nicht die Überschrift "PDF Handbücher"
await expect(footer.getByText("Handbücher", { exact: true })).toBeVisible();
await page.getByText("Handbücher", { exact: true }).click();
await expect(
page.getByRole("heading", { name: "PDF Handbücher" })
).toBeVisible();
await expect(page.getByRole("button", { name: "Schließen" })).toBeVisible();
await expect(page.getByText("KUE705FO.PDF")).toBeVisible();
await page.getByRole("button", { name: "Schließen" }).click();
}

View File

@@ -18,4 +18,5 @@ export async function headerTest(page: Page) {
// Theme Toggle (Label wechselt Dark/Light). Wir akzeptieren beide.
const darkBtn = page.getByRole("button", { name: /Dark Mode|Light Mode/ });
await expect(darkBtn).toBeVisible();
await expect(page.getByText("CPLV4 Ismail Rastede")).toBeVisible();
}