Test: nav ausgelagert

This commit is contained in:
ISA
2025-09-02 11:25:25 +02:00
parent c8616f7bbe
commit 89dc26b0d2
7 changed files with 13 additions and 40 deletions

View File

@@ -2,7 +2,6 @@ import type { Page } from "@playwright/test";
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
export async function navTest(page: Page) {
await page.goto("http://localhost:3000/dashboard");
await highlightAndExpectVisible(
page,
page.getByRole("link", { name: "Übersicht" })

View File

@@ -1,6 +1,6 @@
import type { Page } from "@playwright/test";
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
import { navTest } from "@playwright/components/navTest";
export async function runDashboardTest(page: Page) {
await page.goto("http://localhost:3000/dashboard");
await highlightAndExpectVisible(
@@ -65,39 +65,8 @@ export async function runDashboardTest(page: Page) {
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()
);
// Navigation-Tests ausgelagert:
await navTest(page);
await highlightAndExpectVisible(
page,
page