fix: logo und tests WIP

This commit is contained in:
ISA
2025-09-11 08:36:38 +02:00
parent 95c884bc07
commit 2ceebea533
31 changed files with 544 additions and 1198 deletions

View File

@@ -0,0 +1,225 @@
import { test, expect } from "@playwright/test";
test.use({
viewport: {
height: 1080,
width: 1920,
},
});
test("test", async ({ page }) => {
await page.goto("http://localhost:3000/digitalInputs");
//Snapshot
await expect(page.getByRole("main")).toMatchAriaSnapshot(`
- heading "Meldungseingänge" [level=1]
- heading /Meldungseingänge 1 \\d+/ [level=2]
- table:
- rowgroup:
- row "Eingang Zustand Bezeichnung Aktion":
- cell "Eingang"
- cell "Zustand"
- cell "Bezeichnung"
- cell "Aktion"
- rowgroup:
- row "1 ● DE 1":
- cell "1"
- cell "●"
- cell "DE 1"
- cell
- row "2 ● DE 2":
- cell "2"
- cell "●"
- cell "DE 2"
- cell
- row "3 ● DE 3":
- cell "3"
- cell "●"
- cell "DE 3"
- cell
- row "4 ● DE 4":
- cell "4"
- cell "●"
- cell "DE 4"
- cell
- row "5 ● DE 5":
- cell "5"
- cell "●"
- cell "DE 5"
- cell
- row "6 ● DE 6":
- cell "6"
- cell "●"
- cell "DE 6"
- cell
- row "7 ● DE 7":
- cell "7"
- cell "●"
- cell "DE 7"
- cell
- row "8 ● DE 8":
- cell "8"
- cell "●"
- cell "DE 8"
- cell
- row "9 ● DE 9":
- cell "9"
- cell "●"
- cell "DE 9"
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- heading /Meldungseingänge \\d+ \\d+/ [level=2]
- table:
- rowgroup:
- row "Eingang Zustand Bezeichnung Aktion":
- cell "Eingang"
- cell "Zustand"
- cell "Bezeichnung"
- cell "Aktion"
- rowgroup:
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
- row /\\d+ ● DE \\d+/:
- cell /\\d+/
- cell "●"
- cell /DE \\d+/
- cell
`);
//Snapshot
await page
.getByRole("row", { name: "1 ● DE 1", exact: true })
.getByRole("cell")
.nth(3)
.click();
await page
.getByRole("row", { name: "1 ● DE 1", exact: true })
.locator("svg")
.nth(1)
.click();
await expect(page.getByRole("main")).toMatchAriaSnapshot(`
- heading "Einstellungen Meldungseingang 1" [level=2]
- button "Modal schließen"
`);
await expect(page.getByRole("main")).toMatchAriaSnapshot(`
- text: "Bezeichnung:"
- textbox: DE 1
- text: "Invertierung:"
- switch [checked]
- text: "Ein Filterzeit:"
- spinbutton /Maximal \\d+ ms erlaubt/
- text: "ms Gewichtung:"
- spinbutton /Maximal \\d+ erlaubt/
- text: "Out of Service:"
- switch
- text: Aus
`);
await expect(page.getByRole("main")).toMatchAriaSnapshot(
`- button "Speichern"`
);
});