test: playwright test erfolgreich

This commit is contained in:
ISA
2025-09-11 14:28:27 +02:00
parent bdaf0ec263
commit aedc7ccae5
15 changed files with 614 additions and 25 deletions

View File

@@ -20,24 +20,85 @@ test("Kabelüberwachung", async ({ page }) => {
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.getByText(
"1KÜ705-FO⚙BetriebAlarmErdschluss ISO: 10,00 MOhmRSL: 0,000 kOhmKabel 1Kabel 1V4"
)
).toBeVisible();
await expect(
page.getByText("DetailansichtISORSLTDRKVZ").first()
).toBeVisible();
await expect(
page.locator(".bg-littwin-blue.text-white").first()
).toBeVisible();
await expect(
page.locator(".flex > button:nth-child(2)").first()
).toBeVisible();
await expect(
page.locator(".bg-littwin-blue.text-white.cursor-pointer").first()
).toBeVisible();
await expect(
page.getByRole("button", { name: "KVZ", exact: true }).first()
).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]
`);
});