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.getByRole("button", { name: "KVZ", exact: true }).first().click(); await expect( page .getByRole("dialog", { name: "KVZ Zustände & Meldungen" }) .getByRole("banner") ).toBeVisible(); await expect(page.getByText("KÜ 1")).toBeVisible(); await expect(page.getByText("Von")).toBeVisible(); await expect( page.locator("div").filter({ hasText: /^Von$/ }).getByRole("textbox") ).toBeVisible(); await page .locator("div") .filter({ hasText: /^Von$/ }) .getByRole("textbox") .click(); await expect(page.getByLabel("Sunday", { exact: true })).toBeVisible(); await expect(page.getByLabel("Saturday", { exact: true })).toBeVisible(); await expect(page.getByText("Bis")).toBeVisible(); await page .getByRole("dialog", { name: "KVZ Zustände & Meldungen" }) .getByRole("banner") .click(); await expect(page.getByText("Bis")).toBeVisible(); await expect( page.locator("div").filter({ hasText: /^Bis$/ }).getByRole("textbox") ).toBeVisible(); await page .locator("div") .filter({ hasText: /^Bis$/ }) .getByRole("textbox") .click(); await expect(page.getByLabel("Sunday", { exact: true })).toBeVisible(); await expect(page.getByLabel("Saturday", { exact: true })).toBeVisible(); await page .getByRole("dialog", { name: "KVZ Zustände & Meldungen" }) .getByRole("banner") .click(); await expect(page.getByRole("button", { name: "Anzeigen" })).toBeVisible(); await expect(page.getByText("KVZ1")).toBeVisible(); await expect(page.getByTitle("Slot 0 LED1: Ein")).toBeVisible(); await expect(page.getByText("KVZ2", { exact: true })).toBeVisible(); await expect(page.getByTitle("Slot 0 LED2: Aus")).toBeVisible(); await expect(page.getByText("KVZ3", { exact: true })).toBeVisible(); await expect(page.getByTitle("Slot 0 LED3: Unbekannt")).toBeVisible(); await expect(page.getByText("KVZ4", { exact: true })).toBeVisible(); await expect(page.getByTitle("Slot 0 LED4: Ein")).toBeVisible(); await expect(page.getByRole("cell", { name: "Prio" })).toBeVisible(); await expect(page.getByRole("cell", { name: "Zeitstempel" })).toBeVisible(); await expect(page.getByRole("cell", { name: "Quelle" })).toBeVisible(); await expect(page.getByRole("cell", { name: "Meldung" })).toBeVisible(); await expect(page.getByRole("cell", { name: "Status" })).toBeVisible(); await expect( page .getByRole("row", { name: "12:10:42 CableLine1 Modul online online" }) .getByRole("cell") .first() ).toBeVisible(); await expect( page .getByRole("row", { name: "12:10:42 CableLine1 Aderbruch kommend 1" }) .getByRole("cell") .first() ).toBeVisible(); await page.getByRole("button", { name: "Vollbild" }).click(); await page .getByRole("dialog", { name: "KVZ Zustände & Meldungen" }) .getByLabel("Schließen") .click(); });