WIP: Test fehlgeschlagen

This commit is contained in:
ISA
2025-09-02 14:22:58 +02:00
parent fb79817136
commit 35e34b96d1
18 changed files with 186 additions and 655 deletions

View File

@@ -1,34 +1,17 @@
import type { Page } from "@playwright/test";
import { expect } from "@playwright/test";
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
import { navTest } from "@playwright/components/navTest";
import { headerTest } from "@playwright/components/headerTest";
import { footerTest } from "@playwright/components/footerTest";
export async function runSystemTest(page: Page) {
await page.goto("/system");
// Logo
const logo = page.getByRole("img", { name: "Logo", exact: true });
await highlightAndExpectVisible(page, logo);
await logo.click();
await page.waitForTimeout(100);
// TALAS Logo
const talasLogo = page.getByRole("img", { name: "TALAS Logo" });
await highlightAndExpectVisible(page, talasLogo);
await talasLogo.click();
await page.waitForTimeout(100);
// Meldestation Heading
const meldestation = page.getByRole("heading", { name: "Meldestation" });
await highlightAndExpectVisible(page, meldestation);
await meldestation.click();
await page.waitForTimeout(100);
// CPLV4 Ismail Rastede
const cplv4Text = page.getByText("CPLV4 Ismail Rastede");
await highlightAndExpectVisible(page, cplv4Text);
await cplv4Text.click();
await page.waitForTimeout(100);
//----------------------
await headerTest(page);
await navTest(page);
await footerTest(page);
await page.waitForTimeout(400);
//----------------------
// System Spannungen &
const systemSpannung = page.getByRole("heading", {
name: "System Spannungen &",
@@ -123,24 +106,4 @@ export async function runSystemTest(page: Page) {
await highlightAndExpectVisible(page, img3);
await img3.click({ position: { x: 272, y: 93 } });
await page.waitForTimeout(100);
// Sidebar Links sichtbar
const sidebarLinks2 = [
{ role: "link", name: "Übersicht" },
{ role: "link", name: "Kabelüberwachung" },
{ role: "link", name: "Meldungseingänge" },
{ role: "link", name: "Schaltausgänge" },
{ role: "link", name: "Messwerteingänge" },
{ role: "link", name: "Berichte" },
{ role: "link", name: "System" },
{ role: "link", name: "Einstellungen" },
];
for (const link of sidebarLinks2) {
const locator = page.getByRole(link.role as any, { name: link.name });
await highlightAndExpectVisible(page, locator);
await expect(locator).toBeVisible();
await page.waitForTimeout(50);
}
}
//---------------------------------------------------------------------