fix: logo und tests WIP
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
import type { Page } from "@playwright/test";
|
||||
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
|
||||
|
||||
export async function footerTest(page: Page) {
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page
|
||||
.locator("div")
|
||||
.filter({ hasText: /^Littwin Systemtechnik GmbH & Co\. KG$/ })
|
||||
.locator("svg")
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByText("Littwin Systemtechnik GmbH &")
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page
|
||||
.locator("div")
|
||||
.filter({ hasText: /^Telefon: 04402 972577-0$/ })
|
||||
.locator("svg")
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByText("Telefon: 04402 972577-")
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page
|
||||
.locator("div")
|
||||
.filter({ hasText: /^kontakt@littwin-systemtechnik\.de$/ })
|
||||
.locator("svg")
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByText("kontakt@littwin-systemtechnik")
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page
|
||||
.locator("div")
|
||||
.filter({ hasText: /^Handbücher$/ })
|
||||
.locator("svg")
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByText("Handbücher", { exact: true })
|
||||
);
|
||||
await page.getByText("Handbücher", { exact: true }).click();
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("heading", { name: "PDF Handbücher" })
|
||||
);
|
||||
await highlightAndExpectVisible(page, page.getByText("KUE705FO.PDF"));
|
||||
await page.getByRole("contentinfo").getByRole("button").click();
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import type { Page } from "@playwright/test";
|
||||
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
|
||||
|
||||
export async function headerTest(page: Page) {
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("heading", { name: "Meldestation" })
|
||||
);
|
||||
await highlightAndExpectVisible(page, page.getByRole("banner"));
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("img", { name: "Logo", exact: true })
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
|
||||
|
||||
test("AnalogInputsChartModal opens after clicking chart button", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/analogInputs");
|
||||
// Öffne Modal via Chart-Button (📈)
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("button", { name: "Messkurve anzeigen" })
|
||||
);
|
||||
await page
|
||||
.getByRole("button", { name: "Messkurve anzeigen" })
|
||||
.first()
|
||||
.click();
|
||||
await highlightAndExpectVisible(page, page.getByRole("dialog"));
|
||||
await expect(page.getByRole("dialog")).toBeVisible();
|
||||
});
|
||||
@@ -1,15 +0,0 @@
|
||||
import { test } from "@playwright/test";
|
||||
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
|
||||
|
||||
test("AnalogInputsDatePicker renders two inputs", async ({ page }) => {
|
||||
await page.goto("/analogInputs");
|
||||
// Öffne erst die Chart-Ansicht (enthält den DatePicker)
|
||||
const chartBtn = page
|
||||
.getByRole("button", { name: "Messkurve anzeigen" })
|
||||
.first();
|
||||
await highlightAndExpectVisible(page, chartBtn);
|
||||
await chartBtn.click();
|
||||
await highlightAndExpectVisible(page, page.getByRole("dialog"));
|
||||
await highlightAndExpectVisible(page, page.getByText("Von"));
|
||||
await highlightAndExpectVisible(page, page.getByText("Bis"));
|
||||
});
|
||||
@@ -1,17 +0,0 @@
|
||||
import { test } from "@playwright/test";
|
||||
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
|
||||
|
||||
test("AnalogInputsSettingsModal opens after clicking settings", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/analogInputs");
|
||||
// Wähle die erste Tabellenzeile und in der 5. Spalte (Einstellungen) den Button
|
||||
const firstRow = page.locator("table tbody tr").first();
|
||||
const settingsButton = firstRow.locator("td").nth(4).locator("button");
|
||||
await highlightAndExpectVisible(page, settingsButton);
|
||||
await settingsButton.click();
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("button", { name: "Modal schließen" })
|
||||
);
|
||||
});
|
||||
@@ -1,9 +0,0 @@
|
||||
import { test } from "@playwright/test";
|
||||
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
|
||||
|
||||
test("AnalogInputsTable renders rows", async ({ page }) => {
|
||||
await page.goto("/analogInputs");
|
||||
await highlightAndExpectVisible(page, page.getByRole("table"));
|
||||
// Mindestens eine Tabellenzeile sichtbar
|
||||
await highlightAndExpectVisible(page, page.locator("tbody tr").first());
|
||||
});
|
||||
@@ -1,12 +0,0 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
|
||||
|
||||
test("AnalogInputsView shows heading and table", async ({ page }) => {
|
||||
await page.goto("/analogInputs");
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("heading", { name: "Messwerteingänge" })
|
||||
);
|
||||
await highlightAndExpectVisible(page, page.getByRole("table"));
|
||||
await expect(page.getByRole("table")).toBeVisible();
|
||||
});
|
||||
@@ -1,5 +0,0 @@
|
||||
import { test } from "@playwright/test";
|
||||
|
||||
test.fixme("XioPM visual presence", async ({ page }) => {
|
||||
await page.goto("/analogInputs");
|
||||
});
|
||||
@@ -1,92 +0,0 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
|
||||
|
||||
/**
|
||||
* ISO Modal UI / Behavior Regression Test
|
||||
* Covers:
|
||||
* - Opening ISO modal from cable monitoring page
|
||||
* - Verifies modal structure (header, fullscreen + close buttons)
|
||||
* - Dropdown (Messkurve <-> Meldungen) presence & options
|
||||
* - Toolbar elements (KÜ badge, DateRangePicker fields, Mode dropdown, Daten laden button)
|
||||
* - Style smoke checks via class attributes (non brittle, only key tokens)
|
||||
* - Switching to Meldungen hides date + mode controls and shows table headers
|
||||
*/
|
||||
test.describe("ISO Modal", () => {
|
||||
test("opens and validates core UI + view toggle behavior", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/kabelueberwachung");
|
||||
|
||||
const firstChartButton = page
|
||||
.locator(".bg-littwin-blue.text-white")
|
||||
.first();
|
||||
await highlightAndExpectVisible(page, firstChartButton);
|
||||
await firstChartButton.click();
|
||||
|
||||
const heading = page.getByRole("heading", { name: "Isolationswiderstand" });
|
||||
await highlightAndExpectVisible(page, heading);
|
||||
|
||||
const dialog = page.getByRole("dialog");
|
||||
await expect(dialog).toBeVisible();
|
||||
|
||||
await expect(
|
||||
dialog
|
||||
.locator("button:has(i.bi-fullscreen-exit, i.bi-arrows-fullscreen)")
|
||||
.first()
|
||||
).toBeVisible();
|
||||
await expect(dialog.locator("button:has(i.bi-x-lg)")).toBeVisible();
|
||||
|
||||
const viewToggle = dialog.getByRole("button", {
|
||||
name: /Messkurve|Meldungen/,
|
||||
});
|
||||
await highlightAndExpectVisible(page, viewToggle);
|
||||
|
||||
await expect(dialog.locator(".toolbar")).toBeVisible();
|
||||
await expect(dialog.locator(".toolbar").getByText("KÜ")).toBeVisible();
|
||||
|
||||
await expect(dialog.getByText("Von")).toBeVisible();
|
||||
await expect(dialog.getByText("Bis")).toBeVisible();
|
||||
|
||||
const modeBtn = dialog.getByRole("button", {
|
||||
name: /Alle Messwerte|Stündlich|Täglich/,
|
||||
});
|
||||
await modeBtn.click();
|
||||
await expect(
|
||||
page.getByRole("option", { name: /Alle Messwerte/ })
|
||||
).toBeVisible();
|
||||
await expect(page.getByRole("option", { name: /Stündlich/ })).toBeVisible();
|
||||
await expect(page.getByRole("option", { name: /Täglich/ })).toBeVisible();
|
||||
await page.getByRole("option", { name: "Stündlich" }).click();
|
||||
await modeBtn.click();
|
||||
await page.getByRole("option", { name: "Alle Messwerte" }).click();
|
||||
|
||||
const loadBtn = dialog.getByRole("button", { name: "Daten laden" });
|
||||
await expect(loadBtn).toBeVisible();
|
||||
|
||||
await viewToggle.click();
|
||||
await page.getByRole("option", { name: "Meldungen" }).click();
|
||||
|
||||
for (const header of [
|
||||
"Prio",
|
||||
"Zeitstempel",
|
||||
"Quelle",
|
||||
"Meldung",
|
||||
"Status",
|
||||
]) {
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
dialog.getByRole("cell", { name: header })
|
||||
);
|
||||
}
|
||||
// In Meldungen view only Von/Bis + Anzeigen (no mode dropdown)
|
||||
await expect(dialog.getByText("Von")).toBeVisible();
|
||||
await expect(dialog.getByText("Bis")).toBeVisible();
|
||||
await expect(
|
||||
dialog.getByRole("button", { name: "Anzeigen" })
|
||||
).toBeVisible();
|
||||
|
||||
await viewToggle.click();
|
||||
await page.getByRole("option", { name: "Messkurve" }).click();
|
||||
await expect(dialog.locator("canvas")).toBeVisible();
|
||||
});
|
||||
});
|
||||
@@ -1,72 +0,0 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
|
||||
|
||||
/**
|
||||
* Loop (RSL) Modal UI / Behavior Regression Test
|
||||
*/
|
||||
test.describe("Loop / RSL Modal", () => {
|
||||
test("opens and validates RSL UI & controls", async ({ page }) => {
|
||||
await page.goto("/kabelueberwachung");
|
||||
|
||||
const firstBlue = page.locator(".bg-littwin-blue.text-white").first();
|
||||
await highlightAndExpectVisible(page, firstBlue);
|
||||
await firstBlue.click();
|
||||
|
||||
const heading = page.getByRole("heading", {
|
||||
name: /Schleifenwiderstand|Isolationswiderstand/,
|
||||
});
|
||||
await heading.waitFor();
|
||||
|
||||
if (
|
||||
await page
|
||||
.getByRole("heading", { name: "Isolationswiderstand" })
|
||||
.isVisible()
|
||||
.catch(() => false)
|
||||
) {
|
||||
await page.locator("button:has(i.bi-x-lg)").click();
|
||||
const secondBlue = page.locator(".bg-littwin-blue.text-white").nth(1);
|
||||
await highlightAndExpectVisible(page, secondBlue);
|
||||
await secondBlue.click();
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("heading", { name: "Schleifenwiderstand" })
|
||||
);
|
||||
}
|
||||
|
||||
const dialog = page.getByRole("dialog");
|
||||
await expect(dialog).toBeVisible();
|
||||
|
||||
await expect(
|
||||
dialog
|
||||
.locator("button:has(i.bi-arrows-fullscreen, i.bi-fullscreen-exit)")
|
||||
.first()
|
||||
).toBeVisible();
|
||||
await expect(dialog.locator("button:has(i.bi-x-lg)")).toBeVisible();
|
||||
|
||||
await expect(dialog.locator(".toolbar")).toBeVisible();
|
||||
await expect(dialog.locator(".toolbar").getByText("KÜ")).toBeVisible();
|
||||
|
||||
await expect(dialog.getByText("Von")).toBeVisible();
|
||||
await expect(dialog.getByText("Bis")).toBeVisible();
|
||||
|
||||
const modeBtn = dialog.getByRole("button", {
|
||||
name: /Alle Messwerte|Stündlich|Täglich/,
|
||||
});
|
||||
await modeBtn.click();
|
||||
await expect(
|
||||
page.getByRole("option", { name: /Alle Messwerte/ })
|
||||
).toBeVisible();
|
||||
await expect(page.getByRole("option", { name: /Stündlich/ })).toBeVisible();
|
||||
await expect(page.getByRole("option", { name: /Täglich/ })).toBeVisible();
|
||||
await page.getByRole("option", { name: "Stündlich" }).click();
|
||||
|
||||
const rslButton = dialog.getByRole("button", { name: /RSL/i });
|
||||
await expect(rslButton).toBeVisible();
|
||||
|
||||
const loadBtn = dialog.getByRole("button", { name: "Daten laden" });
|
||||
await expect(loadBtn).toBeVisible();
|
||||
await loadBtn.click();
|
||||
await dialog.locator("canvas").waitFor({ timeout: 5000 });
|
||||
await expect(dialog.locator("canvas")).toBeVisible();
|
||||
});
|
||||
});
|
||||
@@ -1,93 +0,0 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
|
||||
|
||||
/**
|
||||
* TDR Modal UI / Behavior Regression Test
|
||||
*/
|
||||
test.describe("TDR Modal", () => {
|
||||
test("opens and validates TDR UI + dropdown + actions", async ({ page }) => {
|
||||
await page.goto("/kabelueberwachung");
|
||||
|
||||
const blueButtons = page.locator(".bg-littwin-blue.text-white");
|
||||
const count = await blueButtons.count();
|
||||
for (let i = 0; i < Math.min(count, 4); i++) {
|
||||
await highlightAndExpectVisible(page, blueButtons.nth(i));
|
||||
await blueButtons.nth(i).click();
|
||||
if (
|
||||
await page
|
||||
.getByRole("heading", { name: "TDR-Messung" })
|
||||
.isVisible()
|
||||
.catch(() => false)
|
||||
) {
|
||||
break;
|
||||
} else {
|
||||
if (
|
||||
await page
|
||||
.locator("button:has(i.bi-x-lg)")
|
||||
.isVisible()
|
||||
.catch(() => false)
|
||||
) {
|
||||
await page.locator("button:has(i.bi-x-lg)").click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const heading = page.getByRole("heading", { name: "TDR-Messung" });
|
||||
await heading.waitFor();
|
||||
|
||||
const dialog = page.getByRole("dialog");
|
||||
await expect(dialog).toBeVisible();
|
||||
|
||||
await expect(
|
||||
dialog
|
||||
.locator("button:has(i.bi-arrows-fullscreen, i.bi-fullscreen-exit)")
|
||||
.first()
|
||||
).toBeVisible();
|
||||
await expect(dialog.locator("button:has(i.bi-x-lg)")).toBeVisible();
|
||||
|
||||
await expect(dialog.locator(".toolbar")).toBeVisible();
|
||||
await expect(dialog.locator(".toolbar").getByText("KÜ")).toBeVisible();
|
||||
|
||||
const refBtn = dialog.getByRole("button", {
|
||||
name: "TDR-Kurve als Referenz speichern",
|
||||
});
|
||||
await expect(refBtn).toBeVisible();
|
||||
const startBtn = dialog.getByRole("button", {
|
||||
name: /TDR-Messung starten|TDR läuft/,
|
||||
});
|
||||
await expect(startBtn).toBeVisible();
|
||||
|
||||
const measurementBtn = dialog.getByRole("button", { name: /Fehlerstelle/ });
|
||||
await highlightAndExpectVisible(page, measurementBtn);
|
||||
await measurementBtn.click();
|
||||
|
||||
const option = page.getByRole("option", { name: /Fehlerstelle/ }).first();
|
||||
await option.waitFor();
|
||||
await expect(option).toBeVisible();
|
||||
await option.click();
|
||||
await expect(measurementBtn).toContainText("Fehlerstelle");
|
||||
|
||||
const viewToggle = dialog.getByRole("button", {
|
||||
name: /Messkurve|Meldungen/,
|
||||
});
|
||||
await viewToggle.click();
|
||||
await page.getByRole("option", { name: "Meldungen" }).click();
|
||||
|
||||
for (const header of [
|
||||
"Prio",
|
||||
"Zeitstempel",
|
||||
"Quelle",
|
||||
"Meldung",
|
||||
"Status",
|
||||
]) {
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
dialog.getByRole("cell", { name: header })
|
||||
);
|
||||
}
|
||||
|
||||
await viewToggle.click();
|
||||
await page.getByRole("option", { name: "Messkurve" }).click();
|
||||
await expect(dialog.locator("canvas")).toBeVisible();
|
||||
});
|
||||
});
|
||||
@@ -1,57 +0,0 @@
|
||||
import type { Page } from "@playwright/test";
|
||||
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
|
||||
|
||||
export async function navTest(page: Page) {
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("link", { name: "Übersicht" })
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("link", { name: "Kabelüberwachung" })
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("link", { name: "Meldungseingänge" })
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("link", { name: "Schaltausgänge" })
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("link", { name: "Messwerteingänge" })
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("link", { name: "Berichte" })
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("link", { name: "System" })
|
||||
);
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("link", { name: "Einstellungen" })
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
// 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);
|
||||
}
|
||||
*/
|
||||
Reference in New Issue
Block a user