test: analogInputs.test.ts and dashboard.test.ts with import components
This commit is contained in:
@@ -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: {
|
||||
@@ -9,6 +12,11 @@ test.use({
|
||||
|
||||
test("test", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/analogInputs");
|
||||
// Gemeinsame Layout-Checks
|
||||
await headerTest(page);
|
||||
await navTest(page);
|
||||
await footerTest(page);
|
||||
// Seitenspezifische Checks
|
||||
await expect(
|
||||
page.getByRole("heading", { name: "Messwerteingänge" }).first()
|
||||
).toBeVisible();
|
||||
|
||||
@@ -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: {
|
||||
@@ -9,6 +12,11 @@ test.use({
|
||||
|
||||
test("Dashboard", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/dashboard");
|
||||
// Gemeinsame Layout-Checks
|
||||
await headerTest(page);
|
||||
await navTest(page);
|
||||
await footerTest(page);
|
||||
// Seitenspezifische Checks
|
||||
await expect(page.getByRole("main").locator("svg").first()).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole("heading", { name: "Letzten 20 Meldungen" })
|
||||
|
||||
Reference in New Issue
Block a user