test: digitalInputsTest.ts

This commit is contained in:
ISA
2025-08-28 11:49:34 +02:00
parent 93809a85a4
commit 9e84386a5d
15 changed files with 153 additions and 562 deletions

View File

@@ -0,0 +1,243 @@
import type { Page } from "@playwright/test";
import { highlightAndExpectVisible } from "../utils/highlight";
// Kombinierte Helper-Funktion: injiziert CSS (nur einmal), hebt hervor und prüft Sichtbarkeit
export async function runAnalogInputsTest(page: Page) {
await page.goto("/analogInputs");
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Messwerteingänge" }).nth(1)
);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Eingang" })
);
// ...existing code...
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Messwert" })
);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Einheit" })
);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Bezeichnung" })
);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Einstellungen" })
);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Messkurve", exact: true })
);
await highlightAndExpectVisible(page, page.getByText("1", { exact: true }));
await highlightAndExpectVisible(page, page.getByText("2", { exact: true }));
await highlightAndExpectVisible(page, page.getByText("3", { exact: true }));
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "4", exact: true }).locator("path")
);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "5", exact: true })
);
await highlightAndExpectVisible(page, page.getByText("6", { exact: true }));
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "7", exact: true })
);
await page.waitForTimeout(1000);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "8", exact: true })
);
await page.waitForTimeout(1000);
await highlightAndExpectVisible(
page,
page.locator(".border.p-2.text-center").first()
);
// Markiere die gesamte erste Datenzeile (Row mit "AE 1" falls vorhanden)
await page.waitForTimeout(1000);
await highlightAndExpectVisible(
page,
page
.getByRole("row", { name: "2 5.67 °C Temperatur" })
.getByRole("button")
.first()
);
await page.waitForTimeout(1000);
await highlightAndExpectVisible(
page,
page.locator("tr:nth-child(3) > td:nth-child(5)")
);
await page.waitForTimeout(1000);
await highlightAndExpectVisible(
page,
page
.getByRole("row", { name: "0.01 V AE 4 Messkurve anzeigen" })
.getByRole("button")
.first()
);
await page.waitForTimeout(1000);
await highlightAndExpectVisible(
page,
page
.getByRole("row", { name: "8 -0.00 mA AE 8 Messkurve" })
.getByLabel("Messkurve anzeigen")
);
await page.waitForTimeout(1000);
await page.getByRole("cell", { name: "1", exact: true }).click();
await page.locator(".border.p-2.text-center").first().click();
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Einstellungen Messwerteingang" })
);
await highlightAndExpectVisible(page, page.getByText("Bezeichnung:"));
await highlightAndExpectVisible(page, page.getByText("Offset:"));
await highlightAndExpectVisible(page, page.getByText("Faktor:"));
await highlightAndExpectVisible(page, page.getByText("Einheit:"));
await highlightAndExpectVisible(page, page.getByText("Speicherintervall:"));
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Speichern" })
);
await page.waitForTimeout(1000);
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Modal schließen" })
);
await page.waitForTimeout(1000);
await highlightAndExpectVisible(
page,
page.getByText(
"Einstellungen Messwerteingang 1Bezeichnung:Offset:Faktor:Einheit:"
)
);
await page.waitForTimeout(1000);
await page.getByRole("button", { name: "Modal schließen" }).click();
await page
.getByRole("row", { name: "1 126.63 V AE 1 Messkurve" })
.getByLabel("Messkurve anzeigen")
.click();
await highlightAndExpectVisible(
page,
page.getByText(
"Messkurve Messwerteingang 1Eingang 1VonBisAlle MesswerteDaten laden"
)
);
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Messkurve Messwerteingang" })
);
await highlightAndExpectVisible(page, page.locator("canvas"));
await highlightAndExpectVisible(page, page.getByText("Eingang 1VonBisAlle"));
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Daten laden" })
);
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Alle Messwerte " })
);
await highlightAndExpectVisible(page, page.getByText("Von"));
await highlightAndExpectVisible(page, page.getByText("Bis"));
await highlightAndExpectVisible(
page,
page.locator("div").filter({ hasText: /^Von$/ })
);
await highlightAndExpectVisible(
page,
page.locator("div").filter({ hasText: /^Von$/ }).getByRole("textbox")
);
await page.waitForTimeout(1000);
await highlightAndExpectVisible(
page,
page.locator("div").filter({ hasText: /^Bis$/ })
);
await page.waitForTimeout(1000);
await highlightAndExpectVisible(
page,
page.locator("div").filter({ hasText: /^Bis$/ }).getByRole("textbox")
);
await page.waitForTimeout(1000);
await highlightAndExpectVisible(page, page.getByRole("img"));
await page.waitForTimeout(1000);
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Alle Messwerte " })
);
await page.getByRole("button", { name: "Alle Messwerte " }).click();
await page.waitForTimeout(1000);
await page.getByRole("option", { name: "Stündlich" }).click();
await page.waitForTimeout(1000);
await page.getByRole("button", { name: "Stündlich" }).click();
await page.waitForTimeout(1000);
await page.getByRole("option", { name: "Täglich" }).click();
await page.waitForTimeout(1000);
await page.getByRole("button", { name: "Fullscreen" }).click();
await page.getByRole("button", { name: "Exit fullscreen" }).click();
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Fullscreen" })
);
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Modal schließen" })
);
await page.waitForTimeout(1000);
await page.getByRole("button", { name: "Modal schließen" }).click();
// ...dein AnalogInputs-Testcode...
}

View File

@@ -0,0 +1,202 @@
import type { Page } from "@playwright/test";
import { highlightAndExpectVisible } from "../utils/highlight";
export async function runDashboardTest(page: Page) {
await page.goto("http://localhost:3000/dashboard");
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Meldestation" })
);
await highlightAndExpectVisible(page, page.getByRole("banner"));
await highlightAndExpectVisible(
page,
page.getByRole("img", { name: "Logo", exact: true })
);
await highlightAndExpectVisible(
page,
page.getByRole("main").locator("svg").first()
);
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Letzten 20 Meldungen" })
);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Prio" })
);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Zeitstempel" })
);
// ...existing code...
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Quelle" })
);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Meldung" })
);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Status" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Übersicht" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Kabelüberwachung" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Meldungseingänge" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Schaltausgänge" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Messwerteingänge" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Berichte" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "System" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Einstellungen" })
);
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Versionsinformationen" })
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Applikationsversion: 0\.02$/ })
.locator("svg")
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Webversion: 1\.6/ })
.locator("path")
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^1KÜ705FO$/ })
.first()
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^2KÜ705FO$/ })
.first()
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^3KÜ705FO$/ })
.first()
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^32KÜ705FO$/ })
.first()
);
await highlightAndExpectVisible(
page,
page.getByRole("img", { name: "IP Address" })
);
await highlightAndExpectVisible(page, page.getByText("IP-Adresse"));
await highlightAndExpectVisible(page, page.getByRole("main"));
await highlightAndExpectVisible(page, page.getByText("10.10.0.243"));
await highlightAndExpectVisible(page, page.getByText("Subnet-Maske"));
await highlightAndExpectVisible(
page,
page.getByRole("img", { name: "subnet mask" })
);
await highlightAndExpectVisible(page, page.getByText("255.255.255.0"));
await highlightAndExpectVisible(page, page.getByText("Gateway"));
await highlightAndExpectVisible(
page,
page.getByRole("img", { name: "gateway" })
);
await highlightAndExpectVisible(page, page.getByText("10.10.0.1"));
await highlightAndExpectVisible(page, page.getByText("OPC-UA"));
await highlightAndExpectVisible(
page,
page.getByRole("paragraph").filter({ hasText: "Status" })
);
await highlightAndExpectVisible(
page,
page.getByText("Server betriebsbereit")
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Littwin Systemtechnik GmbH & Co\. KG$/ })
.locator("svg")
);
await highlightAndExpectVisible(
page,
page.getByText("Littwin Systemtechnik GmbH &")
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Telefon: 04402 972577-0$/ })
.locator("svg")
);
await highlightAndExpectVisible(
page,
page.getByText("Telefon: 04402 972577-")
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^kontakt@littwin-systemtechnik\.de$/ })
.locator("svg")
);
await highlightAndExpectVisible(
page,
page.getByText("kontakt@littwin-systemtechnik")
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Handbücher$/ })
.locator("svg")
);
await highlightAndExpectVisible(
page,
page.getByText("Handbücher", { exact: true })
);
await page.getByText("Handbücher", { exact: true }).click();
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "PDF Handbücher" })
);
await highlightAndExpectVisible(page, page.getByText("KUE705FO.PDF"));
//await highlightAndExpectVisible(page, page.getByRole("button"));
//await page.getByRole("button").click();
}

View File

@@ -0,0 +1,214 @@
import type { Page } from "@playwright/test";
import { highlightAndExpectVisible } from "../utils/highlight";
export async function runDigitalInputsTest(page: Page) {
await page.goto("/digitalInputs");
await highlightAndExpectVisible(
page,
page.getByRole("img", { name: "Logo", exact: true })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("img", { name: "TALAS Logo" })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Meldestation" })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(page, page.getByText("CPLV4 Ismail Rastede"));
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Übersicht" })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Kabelüberwachung" })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Meldungseingänge" })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Schaltausgänge" })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Messwerteingänge" })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Berichte" })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "System" })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Einstellungen" })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Littwin Systemtechnik GmbH & Co\. KG$/ })
.locator("svg")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByText("Littwin Systemtechnik GmbH &")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Telefon: 04402 972577-0$/ })
.locator("svg")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByText("Telefon: 04402 972577-")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^kontakt@littwin-systemtechnik\.de$/ })
.locator("svg")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByText("kontakt@littwin-systemtechnik")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Handbücher$/ })
.locator("path")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByText("Handbücher", { exact: true })
);
await page.waitForTimeout(400);
await page.getByText("Handbücher", { exact: true }).click();
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "PDF Handbücher" })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(page, page.getByText("KUE705FO.PDF"));
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Meldungseingänge", exact: true })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Meldungseingänge 1 " }).locator("svg")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Meldungseingänge 1 " })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Eingang" }).first()
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Zustand" }).first()
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Bezeichnung" }).first()
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Aktion" }).first()
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "1", exact: true }).locator("svg")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(page, page.getByText("1", { exact: true }));
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page
.getByRole("row", { name: "1 ● DE 1", exact: true })
.getByRole("cell")
.nth(1)
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("row", { name: "1 ● DE 1", exact: true }).locator("span")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "DE 1", exact: true })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page
.getByRole("row", { name: "1 ● DE 1", exact: true })
.locator("svg")
.nth(1)
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "13", exact: true }).locator("svg")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(page, page.getByText("13", { exact: true }));
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("row", { name: "● DE 13" }).getByRole("cell").nth(1)
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("row", { name: "● DE 13" }).locator("span")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "DE 13" })
);
await page.waitForTimeout(1000);
}

View File

@@ -0,0 +1,260 @@
import { expect } from "@playwright/test";
import type { Page } from "@playwright/test";
import { highlightAndExpectVisible } from "./highlight";
export async function runSettingsPageTest(page: Page) {
await page.goto("http://localhost:3000/einstellungen");
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Meldestation" })
);
await highlightAndExpectVisible(
page,
page.getByRole("img", { name: "TALAS Logo" })
);
await highlightAndExpectVisible(
page,
page.getByRole("img", { name: "Logo", exact: true })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Übersicht" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Kabelüberwachung" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Meldungseingänge" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Schaltausgänge" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Messwerteingänge" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Berichte" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "System" })
);
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Einstellungen" })
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Littwin Systemtechnik GmbH & Co\. KG$/ })
.locator("svg")
);
await highlightAndExpectVisible(
page,
page.getByText("Littwin Systemtechnik GmbH &")
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Telefon: 04402 972577-0$/ })
.locator("svg")
);
await highlightAndExpectVisible(
page,
page.getByText("Telefon: 04402 972577-")
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^kontakt@littwin-systemtechnik\.de$/ })
.locator("svg")
);
await highlightAndExpectVisible(
page,
page.getByText("kontakt@littwin-systemtechnik")
);
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Handbücher$/ })
.locator("svg")
);
await highlightAndExpectVisible(
page,
page.getByText("Handbücher", { exact: true })
);
await page.getByText("Handbücher", { exact: true }).click();
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "PDF Handbücher" })
);
await highlightAndExpectVisible(page, page.getByText("KUE705FO.PDF"));
//await page.getByRole("button").filter({ hasText: /^$/ }).click();
await page.getByRole("button", { name: "Allgemeine Einstellungen" }).click();
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Allgemeine Einstellungen" })
);
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Allgemeine Einstellungen" })
);
await highlightAndExpectVisible(page, page.getByText("Name:"));
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Name:$/ })
.getByRole("textbox")
);
await highlightAndExpectVisible(page, page.getByText("MAC Adresse 1:"));
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Systemzeit übernehmen" })
);
await highlightAndExpectVisible(page, page.getByText("IP:"));
await highlightAndExpectVisible(
page,
page.locator("div").filter({ hasText: /^IP:$/ }).getByRole("textbox")
);
await highlightAndExpectVisible(page, page.getByText("Subnet:"));
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Subnet:$/ })
.getByRole("textbox")
);
await highlightAndExpectVisible(page, page.getByText("Gateway:"));
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Gateway:$/ })
.getByRole("textbox")
);
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Neustart CPL" })
);
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Speichern" })
);
await page.getByRole("button", { name: "OPCUA" }).click();
await highlightAndExpectVisible(
page,
page.getByRole("img", { name: "OPCUA Logo" }).first()
);
await highlightAndExpectVisible(
page,
page.getByRole("img", { name: "OPCUA Logo" }).nth(1)
);
await highlightAndExpectVisible(page, page.getByText("Server Status:"));
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Aktiviert" })
);
await highlightAndExpectVisible(page, page.getByText("OPCUA Zustand"));
await highlightAndExpectVisible(page, page.getByText("1"));
await highlightAndExpectVisible(page, page.getByText("Nodeset Name"));
await highlightAndExpectVisible(page, page.getByText("Aktuelle OPC-Clients"));
await highlightAndExpectVisible(page, page.getByText("0", { exact: true }));
await page.getByRole("button", { name: "Datenbank" }).click();
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Datenbank Einstellungen" })
);
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Meldungen löschen" })
);
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Messwerte Logger löschen" })
);
await page.getByRole("button", { name: "NTP" }).click();
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "NTP Einstellungen" })
);
await highlightAndExpectVisible(page, page.getByText("NTP Server 1"));
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^NTP Server 1$/ })
.getByRole("textbox")
);
await highlightAndExpectVisible(page, page.getByText("NTP Server 3"));
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^NTP Server 3$/ })
.getByRole("textbox")
);
await highlightAndExpectVisible(page, page.getByText("NTP Server 2"));
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^NTP Server 2$/ })
.getByRole("textbox")
);
await highlightAndExpectVisible(page, page.getByText("Zeitzone"));
await highlightAndExpectVisible(
page,
page
.locator("div")
.filter({ hasText: /^Zeitzone$/ })
.getByRole("textbox")
);
await highlightAndExpectVisible(page, page.getByText("NTP aktiv:"));
await highlightAndExpectVisible(page, page.getByRole("checkbox"));
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Speichern" })
);
await page.getByRole("button", { name: "Benutzerverwaltung" }).click();
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Login Admin-Bereich" })
);
await highlightAndExpectVisible(
page,
page.getByRole("textbox", { name: "Benutzername" })
);
await highlightAndExpectVisible(
page,
page.getByRole("textbox", { name: "Passwort" })
);
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Admin anmelden" })
);
await page.getByRole("textbox", { name: "Benutzername" }).click();
await page.getByRole("textbox", { name: "Benutzername" }).fill("admin");
await page.getByRole("textbox", { name: "Passwort" }).click();
await page.getByRole("textbox", { name: "Passwort" }).fill("admin");
await page.getByRole("button", { name: "Admin anmelden" }).click();
await highlightAndExpectVisible(page, page.getByText("Login erfolgreich!"));
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Abmelden" })
);
await highlightAndExpectVisible(
page,
page.getByRole("button", { name: "Admin anmelden" })
);
}