playwright: test Reihenfolge

This commit is contained in:
ISA
2025-08-14 16:20:42 +02:00
parent 3e0b1e98bb
commit 5e9c7e9bfe
7 changed files with 236 additions and 255 deletions

View File

@@ -1,6 +1,5 @@
import { test, expect } from "../fixtures";
import type { Locator, Page } from "@playwright/test";
export async function runDashboardTest(page: Page) {}
import { expect } from "../fixtures";
// Kombinierte Helper-Funktion: injiziert CSS (nur einmal), hebt hervor und prüft Sichtbarkeit
async function highlightAndExpectVisible(
@@ -29,8 +28,8 @@ async function highlightAndExpectVisible(
}
await expect(locator).toBeVisible();
}
test.slow();
test("Daschboard-Test", async ({ page }) => {
export async function runDashboardTest(page: Page) {
await page.goto("http://localhost:3000/dashboard");
await highlightAndExpectVisible(
page,
@@ -57,6 +56,7 @@ test("Daschboard-Test", async ({ page }) => {
page,
page.getByRole("cell", { name: "Zeitstempel" })
);
// ...existing code...
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Quelle" })
@@ -227,4 +227,4 @@ test("Daschboard-Test", async ({ page }) => {
await highlightAndExpectVisible(page, page.getByText("KUE705FO.PDF"));
await highlightAndExpectVisible(page, page.getByRole("button"));
await page.getByRole("button").click();
});
}