Files
CPLv4.0/playwright/tests/pages/kabelueberwachung/modals/tdrModal.test.ts
2025-09-11 14:28:27 +02:00

65 lines
2.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { test, expect } from "@playwright/test";
test.use({
viewport: {
height: 800,
width: 1280,
},
});
test("test", async ({ page }) => {
await page.goto("http://localhost:3000/kabelueberwachung");
await page
.locator(".bg-littwin-blue.text-white.cursor-pointer")
.first()
.click();
await expect(page.getByLabel("TDR Messung").getByRole("banner"))
.toMatchAriaSnapshot(`
- banner:
- heading "TDR-Messung" [level=3]
- button "Vollbild"
- button "Schließen"
- button "Messkurve "
`);
await expect(page.getByText("KÜ1")).toBeVisible();
await expect(
page.getByRole("button", { name: "TDR-Kurve als Referenz" })
).toBeVisible();
await expect(
page.getByRole("button", { name: "TDR-Messung starten" })
).toBeVisible();
await expect(
page.getByRole("button", { name: "27.03.2025, 23:42:41 " })
).toBeVisible();
await expect(page.locator("canvas")).toBeVisible();
await page.getByRole("button", { name: "Messkurve " }).click();
await page.getByRole("option", { name: "Meldungen" }).click();
await expect(page.getByText("Von")).toBeVisible();
await expect(
page.locator("div").filter({ hasText: /^Von$/ }).getByRole("textbox")
).toBeVisible();
await expect(page.getByText("Bis")).toBeVisible();
await expect(
page.locator("div").filter({ hasText: /^Bis$/ }).getByRole("textbox")
).toBeVisible();
await expect(page.getByRole("button", { name: "Anzeigen" })).toBeVisible();
await page.getByRole("cell", { name: "Prio" }).click();
await page.getByRole("cell", { name: "Zeitstempel" }).click();
await page.getByRole("cell", { name: "Quelle" }).click();
await page.getByRole("cell", { name: "Meldung" }).click();
await page.getByRole("cell", { name: "Status" }).click();
await page
.getByLabel("TDR Messung")
.locator("div")
.filter({
hasText:
"PrioZeitstempelQuelleMeldungStatus03.09.2025, 12:10:42CableLine1Modul",
})
.nth(3)
.click();
await page
.getByRole("dialog", { name: "TDR Messung" })
.getByLabel("Schließen")
.click();
});