test: analogInputs.test.ts and dashboard.test.ts with import components

This commit is contained in:
ISA
2025-09-11 08:50:39 +02:00
parent 7f035f0c18
commit 74880d9ccc
8 changed files with 35 additions and 10 deletions

View File

@@ -4,11 +4,15 @@ import { Page, expect } from "@playwright/test";
* Footer assertions.
*/
export async function footerTest(page: Page) {
await expect(page.getByText(/Littwin Systemtechnik GmbH/)).toBeVisible();
await expect(page.getByText(/Telefon: 04402 972577/)).toBeVisible();
// Auf Footer-Bereich einschränken, damit Selektoren eindeutig bleiben
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(
page.getByText(/kontakt@littwin-systemtechnik\.de/)
footer.getByText(/kontakt@littwin-systemtechnik\.de/)
).toBeVisible();
// Handbücher Button/Icon (Text oder Button reicht)
await expect(page.getByText(/Handbücher/)).toBeVisible();
// Exaktes Label im Footer, nicht die Überschrift "PDF Handbücher"
await expect(footer.getByText("Handbücher", { exact: true })).toBeVisible();
}