105 lines
3.7 KiB
TypeScript
105 lines
3.7 KiB
TypeScript
import { test, expect } from "@playwright/test";
|
|
import { headerTest } from "@/playwright/tests/components/header/headerTest";
|
|
import { navTest } from "@/playwright/tests/components/navigation/navTest";
|
|
import { footerTest } from "@/playwright/tests/components/footer/footerTest";
|
|
|
|
test.use({
|
|
viewport: {
|
|
height: 900,
|
|
width: 1600,
|
|
},
|
|
});
|
|
|
|
test("Kabelüberwachung", async ({ page }) => {
|
|
await page.goto("/kabelueberwachung");
|
|
// Gemeinsame Layout-Checks
|
|
await headerTest(page);
|
|
await navTest(page);
|
|
await footerTest(page);
|
|
await expect(page.getByRole("button", { name: "Rack 1" })).toBeVisible();
|
|
await expect(page.getByRole("button", { name: "Rack 2" })).toBeVisible();
|
|
await expect(page.getByRole("button", { name: "Rack 3" })).toBeVisible();
|
|
await expect(page.getByRole("button", { name: "Rack 4" })).toBeVisible();
|
|
//--
|
|
await expect(page.getByRole("main")).toMatchAriaSnapshot(`
|
|
- text: "1"
|
|
- heading /KÜ\\d+-FO/ [level=3]
|
|
- button "⚙"
|
|
- text: "/Betrieb Alarm Erdschluss ISO: \\\\d+,\\\\d+ MOhm RSL: \\\\d+,\\\\d+ kOhm Kabel 1 V4\\\\.\\\\d+ Detailansicht/"
|
|
- button "ISO"
|
|
- button "RSL"
|
|
- button "TDR"
|
|
- button "KVZ"
|
|
`);
|
|
await expect(page.getByRole("main")).toMatchAriaSnapshot(`
|
|
- text: "2"
|
|
- heading /KÜ\\d+-FO/ [level=3]
|
|
- button "⚙"
|
|
- text: "/Betrieb Alarm Messpannung ISO: \\\\d+,\\\\d+ MOhm RSL: \\\\d+,\\\\d+ kOhm Kabel 2 V4\\\\.\\\\d+ Detailansicht/"
|
|
- button "ISO"
|
|
- button "RSL"
|
|
- button
|
|
- button "KVZ"
|
|
`);
|
|
await expect(page.getByRole("main")).toMatchAriaSnapshot(`
|
|
- text: "3"
|
|
- heading /KÜ\\d+-FO/ [level=3]
|
|
- button "⚙"
|
|
- text: "/Betrieb Alarm Erdschluss ISO: \\\\d+,\\\\d+ MOhm RSL: \\\\d+,\\\\d+ kOhm Kabel 3 V4\\\\.\\\\d+ Detailansicht/"
|
|
- button "ISO"
|
|
- button "RSL"
|
|
- button "TDR"
|
|
- button "KVZ"
|
|
`);
|
|
await expect(page.getByRole("main")).toMatchAriaSnapshot(`
|
|
- text: "4"
|
|
- heading /KÜ\\d+-FO/ [level=3]
|
|
- button "⚙"
|
|
- text: "/Betrieb Alarm Aderbruch ISO: \\\\d+,\\\\d+ MOhm RSL: \\\\d+,\\\\d+ kOhm Kabel 4 V4\\\\.\\\\d+ Detailansicht/"
|
|
- button "ISO"
|
|
- button "RSL"
|
|
- button "TDR"
|
|
- button "KVZ nicht verfügbar" [disabled]
|
|
`);
|
|
await expect(page.getByRole("main")).toMatchAriaSnapshot(`
|
|
- text: "5"
|
|
- heading /KÜ\\d+-FO/ [level=3]
|
|
- button "⚙"
|
|
- text: "/Betrieb Alarm ISO: \\\\d+,\\\\d+ MOhm RSL: \\\\d+,\\\\d+ kOhm Kabel 5 V4\\\\.\\\\d+ Detailansicht/"
|
|
- button "ISO"
|
|
- button "RSL"
|
|
- button "TDR"
|
|
- button "KVZ nicht verfügbar" [disabled]
|
|
`);
|
|
await expect(page.getByRole("main")).toMatchAriaSnapshot(`
|
|
- text: "6"
|
|
- heading /KÜ\\d+-FO/ [level=3]
|
|
- button "⚙"
|
|
- text: "/Betrieb Alarm ISO: \\\\d+,\\\\d+ MOhm RSL: \\\\d+,\\\\d+ kOhm Kabel 6 V4\\\\.\\\\d+ Detailansicht/"
|
|
- button "ISO"
|
|
- button "RSL"
|
|
- button "TDR"
|
|
- button "KVZ nicht verfügbar" [disabled]
|
|
`);
|
|
await expect(page.getByRole("main")).toMatchAriaSnapshot(`
|
|
- text: "7"
|
|
- heading /KÜ\\d+-FO/ [level=3]
|
|
- button "⚙"
|
|
- text: "/Betrieb Alarm Schleifenfehler ISO: \\\\d+,\\\\d+ MOhm RSL: \\\\d+,\\\\d+ kOhm Kabel 7 V4\\\\.\\\\d+ Detailansicht/"
|
|
- button "ISO"
|
|
- button "RSL"
|
|
- button "TDR"
|
|
- button "KVZ nicht verfügbar" [disabled]
|
|
`);
|
|
await expect(page.getByRole("main")).toMatchAriaSnapshot(`
|
|
- text: "8"
|
|
- heading /KÜ\\d+-FO/ [level=3]
|
|
- button "⚙"
|
|
- text: "/Betrieb Alarm Isolationsfehler ISO: \\\\d+,\\\\d+ MOhm RSL: \\\\d+,\\\\d+ kOhm Kabel_8 in Salzgitter bei Hannover Kabel_8 in Salzgitter bei Hannover V4\\\\.\\\\d+ Detailansicht/"
|
|
- button "ISO"
|
|
- button "RSL"
|
|
- button "TDR"
|
|
- button "KVZ nicht verfügbar" [disabled]
|
|
`);
|
|
});
|