test: Tests erfolgreich mit base url von playwright.config.ts

This commit is contained in:
ISA
2025-09-11 10:11:11 +02:00
parent 74880d9ccc
commit 5ef7e648eb
17 changed files with 504 additions and 484 deletions

View File

@@ -1,4 +1,7 @@
import { test, expect } from "@playwright/test";
import { headerTest } from "@/playwright/tests/components/header/headerTest";
import { navTest } from "@/playwright/tests/components/navigation/navTest";
import { footerTest } from "@/playwright/tests/components/footer/footerTest";
test.use({
viewport: {
@@ -7,8 +10,12 @@ test.use({
},
});
test("test", async ({ page }) => {
await page.goto("http://localhost:3000/kabelueberwachung");
test("Kabelüberwachung", async ({ page }) => {
await page.goto("/kabelueberwachung");
// Gemeinsame Layout-Checks
await headerTest(page);
await navTest(page);
await footerTest(page);
await expect(page.getByRole("button", { name: "Rack 1" })).toBeVisible();
await expect(page.getByRole("button", { name: "Rack 2" })).toBeVisible();
await expect(page.getByRole("button", { name: "Rack 3" })).toBeVisible();