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,62 @@
import { test, expect } from "@playwright/test";
test.use({
viewport: {
height: 900,
width: 1600,
},
});
test("Dashboard", async ({ page }) => {
await page.goto("http://localhost:3000/dashboard");
await expect(page.getByRole("main").locator("svg").first()).toBeVisible();
await expect(
page.getByRole("heading", { name: "Letzten 20 Meldungen" })
).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("heading", { name: "Versionsinformationen" })
).toBeVisible();
await expect(page.getByRole("main").locator("path").nth(2)).toBeVisible();
await expect(
page
.getByRole("listitem")
.filter({ hasText: "Webversion:" })
.locator("path")
).toBeVisible();
await expect(page.locator("div").filter({ hasText: /^1$/ })).toBeVisible();
await expect(page.getByText("8", { exact: true })).toBeVisible();
await expect(page.getByText("9", { exact: true })).toBeVisible();
await expect(
page.locator(
"div:nth-child(2) > .flex.gap-1 > div:nth-child(8) > .border > .bg-littwin-blue.flex-grow > div:nth-child(2)"
)
).toBeVisible();
await expect(page.getByText("17KÜ705FO")).toBeVisible();
await expect(
page.locator(
"div:nth-child(3) > .flex.gap-1 > div:nth-child(8) > .border > .bg-littwin-blue.flex-grow > div:nth-child(2)"
)
).toBeVisible();
await expect(page.getByText("25KÜ705FO")).toBeVisible();
await expect(page.getByText("32KÜ705FO")).toBeVisible();
await expect(page.getByRole("img", { name: "IP Address" })).toBeVisible();
await expect(page.getByText("IP-Adresse")).toBeVisible();
await expect(page.getByRole("main")).toContainText("10.10.0.243");
await expect(page.getByRole("main")).toContainText("255.255.255.0");
await expect(page.getByRole("main")).toContainText("10.10.0.1");
await page.getByText("Server betriebsbereit").click();
await page
.getByRole("row", { name: "2025-09-05 11:52:44" })
.getByRole("cell")
.first()
.click();
await expect(page.locator("tbody")).toContainText("2025-09-05 11:52:44");
await expect(page.locator("tbody")).toContainText("CableLine13");
await expect(page.locator("tbody")).toContainText("Isofehler gehend");
await expect(page.locator("tbody")).toContainText("0");
});