playwright: test Reihenfolge
This commit is contained in:
@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=false
|
NEXT_PUBLIC_EXPORT_STATIC=false
|
||||||
NEXT_PUBLIC_USE_CGI=false
|
NEXT_PUBLIC_USE_CGI=false
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.726
|
NEXT_PUBLIC_APP_VERSION=1.6.727
|
||||||
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=true
|
NEXT_PUBLIC_EXPORT_STATIC=true
|
||||||
NEXT_PUBLIC_USE_CGI=true
|
NEXT_PUBLIC_USE_CGI=true
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.726
|
NEXT_PUBLIC_APP_VERSION=1.6.727
|
||||||
NEXT_PUBLIC_CPL_MODE=production
|
NEXT_PUBLIC_CPL_MODE=production
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
|
## [1.6.727] – 2025-08-14
|
||||||
|
|
||||||
|
- playwright: Reihenfolge
|
||||||
|
|
||||||
|
---
|
||||||
## [1.6.726] – 2025-08-14
|
## [1.6.726] – 2025-08-14
|
||||||
|
|
||||||
- playwright: dashboard
|
- playwright: dashboard
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.726",
|
"version": "1.6.727",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.726",
|
"version": "1.6.727",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/roboto": "^5.1.0",
|
"@fontsource/roboto": "^5.1.0",
|
||||||
"@headlessui/react": "^2.2.4",
|
"@headlessui/react": "^2.2.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.726",
|
"version": "1.6.727",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
@@ -1,294 +1,270 @@
|
|||||||
import { test, expect } from "../fixtures";
|
import { expect } from "../fixtures";
|
||||||
import type { Locator, Page } from "@playwright/test";
|
import type { Locator, Page } from "@playwright/test";
|
||||||
|
|
||||||
export async function runAnalogInputsTest(page: Page) {
|
// Kombinierte Helper-Funktion: injiziert CSS (nur einmal), hebt hervor und prüft Sichtbarkeit
|
||||||
// Kombinierte Helper-Funktion: injiziert CSS (nur einmal), hebt hervor und prüft Sichtbarkeit
|
async function highlightAndExpectVisible(
|
||||||
async function highlightAndExpectVisible(
|
page: Page,
|
||||||
page: Page,
|
locator: Locator,
|
||||||
locator: Locator,
|
durationMs = 800
|
||||||
durationMs = 800
|
) {
|
||||||
) {
|
// CSS nur einmal pro Page injizieren
|
||||||
// CSS nur einmal pro Page injizieren
|
if (!(await page.evaluate(() => (window as any).__pwForceCssInjected))) {
|
||||||
if (!(await page.evaluate(() => (window as any).__pwForceCssInjected))) {
|
await page.addStyleTag({
|
||||||
await page.addStyleTag({
|
content: `
|
||||||
content: `
|
.pw-force-outline { outline: 3px solid #ff1744 !important; outline-offset: 2px !important; box-shadow: 0 0 0 3px rgba(224,0,43,.35) !important; }
|
||||||
.pw-force-outline { outline: 3px solid #ff1744 !important; outline-offset: 2px !important; box-shadow: 0 0 0 3px rgba(224,0,43,.35) !important; }
|
`,
|
||||||
`,
|
});
|
||||||
});
|
await page.evaluate(() => {
|
||||||
await page.evaluate(() => {
|
(window as any).__pwForceCssInjected = true;
|
||||||
(window as any).__pwForceCssInjected = true;
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
const els = await locator.elementHandles();
|
|
||||||
for (const el of els) {
|
|
||||||
await el.evaluate((node: unknown, ms: number) => {
|
|
||||||
const n = node as HTMLElement;
|
|
||||||
n.classList.add("pw-force-outline");
|
|
||||||
window.setTimeout(() => n.classList.remove("pw-force-outline"), ms);
|
|
||||||
}, durationMs);
|
|
||||||
}
|
|
||||||
await expect(locator).toBeVisible();
|
|
||||||
}
|
}
|
||||||
|
const els = await locator.elementHandles();
|
||||||
|
for (const el of els) {
|
||||||
|
await el.evaluate((node: unknown, ms: number) => {
|
||||||
|
const n = node as HTMLElement;
|
||||||
|
n.classList.add("pw-force-outline");
|
||||||
|
window.setTimeout(() => n.classList.remove("pw-force-outline"), ms);
|
||||||
|
}, durationMs);
|
||||||
|
}
|
||||||
|
await expect(locator).toBeVisible();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
export async function runAnalogInputsTest(page: Page) {
|
||||||
import { test, expect } from "../fixtures";
|
await page.goto("/analogInputs");
|
||||||
npx playwright codegen http://localhost:3000/analogInputs --target=ts -o tests/e2e/analog-inputs.spec.ts
|
await highlightAndExpectVisible(
|
||||||
ob ein Element sichtbar ist dann Auge Icon klicken
|
page,
|
||||||
ansonsten nimmt automatich die klicks auf
|
page.getByRole("heading", { name: "Messwerteingänge" }).nth(1)
|
||||||
//----------------------------------------------
|
);
|
||||||
Zum ausführen
|
await highlightAndExpectVisible(
|
||||||
|
page,
|
||||||
|
page.getByRole("cell", { name: "Eingang" })
|
||||||
|
);
|
||||||
|
// ...existing code...
|
||||||
|
|
||||||
alle Test datei , je nach dem wie in package.json definiert ist
|
await highlightAndExpectVisible(
|
||||||
npm run test:e2e:ui
|
page,
|
||||||
|
page.getByRole("cell", { name: "Messwert" })
|
||||||
|
);
|
||||||
|
|
||||||
bestimmte datei
|
await highlightAndExpectVisible(
|
||||||
npm run test:e2e:ui -- tests/analogInputs.spec.ts
|
page,
|
||||||
npm run test:e2e:ui -- tests/e2e/analog-inputs.spec.ts
|
page.getByRole("cell", { name: "Einheit" })
|
||||||
*/
|
);
|
||||||
|
|
||||||
test.slow();
|
await highlightAndExpectVisible(
|
||||||
test("Messwerteingänge", async ({ page }) => {
|
page,
|
||||||
await page.goto("/analogInputs");
|
page.getByRole("cell", { name: "Bezeichnung" })
|
||||||
|
);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("heading", { name: "Messwerteingänge" }).nth(1)
|
page.getByRole("cell", { name: "Einstellungen" })
|
||||||
);
|
);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("cell", { name: "Eingang" })
|
page.getByRole("cell", { name: "Messkurve", exact: true })
|
||||||
);
|
);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(page, page.getByText("1", { exact: true }));
|
||||||
page,
|
|
||||||
page.getByRole("cell", { name: "Messwert" })
|
|
||||||
);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(page, page.getByText("2", { exact: true }));
|
||||||
page,
|
|
||||||
page.getByRole("cell", { name: "Einheit" })
|
|
||||||
);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(page, page.getByText("3", { exact: true }));
|
||||||
page,
|
|
||||||
page.getByRole("cell", { name: "Bezeichnung" })
|
|
||||||
);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("cell", { name: "Einstellungen" })
|
page.getByRole("cell", { name: "4", exact: true }).locator("path")
|
||||||
);
|
);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("cell", { name: "Messkurve", exact: true })
|
page.getByRole("cell", { name: "5", exact: true })
|
||||||
);
|
);
|
||||||
|
|
||||||
await highlightAndExpectVisible(page, page.getByText("1", { exact: true }));
|
await highlightAndExpectVisible(page, page.getByText("6", { exact: true }));
|
||||||
|
|
||||||
await highlightAndExpectVisible(page, page.getByText("2", { exact: true }));
|
await highlightAndExpectVisible(
|
||||||
|
page,
|
||||||
|
page.getByRole("cell", { name: "7", exact: true })
|
||||||
|
);
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
await highlightAndExpectVisible(page, page.getByText("3", { exact: true }));
|
await highlightAndExpectVisible(
|
||||||
|
page,
|
||||||
|
page.getByRole("cell", { name: "8", exact: true })
|
||||||
|
);
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("cell", { name: "4", exact: true }).locator("path")
|
page.locator(".border.p-2.text-center").first()
|
||||||
);
|
);
|
||||||
|
// Markiere die gesamte erste Datenzeile (Row mit "AE 1" falls vorhanden)
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await page.waitForTimeout(3000);
|
||||||
page,
|
|
||||||
page.getByRole("cell", { name: "5", exact: true })
|
|
||||||
);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(page, page.getByText("6", { exact: true }));
|
await highlightAndExpectVisible(
|
||||||
|
page,
|
||||||
|
page
|
||||||
|
.getByRole("row", { name: "2 5.67 °C Temperatur" })
|
||||||
|
.getByRole("button")
|
||||||
|
.first()
|
||||||
|
);
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("cell", { name: "7", exact: true })
|
page.locator("tr:nth-child(3) > td:nth-child(5)")
|
||||||
);
|
);
|
||||||
await page.waitForTimeout(3000);
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("cell", { name: "8", exact: true })
|
page
|
||||||
);
|
.getByRole("row", { name: "0.01 V AE 4 Messkurve anzeigen" })
|
||||||
await page.waitForTimeout(3000);
|
.getByRole("button")
|
||||||
|
.first()
|
||||||
|
);
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.locator(".border.p-2.text-center").first()
|
page
|
||||||
);
|
.getByRole("row", { name: "8 -0.00 mA AE 8 Messkurve" })
|
||||||
// Markiere die gesamte erste Datenzeile (Row mit "AE 1" falls vorhanden)
|
|
||||||
|
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
|
||||||
page,
|
|
||||||
page
|
|
||||||
.getByRole("row", { name: "2 5.67 °C Temperatur" })
|
|
||||||
.getByRole("button")
|
|
||||||
.first()
|
|
||||||
);
|
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
|
||||||
page,
|
|
||||||
page.locator("tr:nth-child(3) > td:nth-child(5)")
|
|
||||||
);
|
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
|
||||||
page,
|
|
||||||
page
|
|
||||||
.getByRole("row", { name: "0.01 V AE 4 Messkurve anzeigen" })
|
|
||||||
.getByRole("button")
|
|
||||||
.first()
|
|
||||||
);
|
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
|
||||||
page,
|
|
||||||
page
|
|
||||||
.getByRole("row", { name: "8 -0.00 mA AE 8 Messkurve" })
|
|
||||||
.getByLabel("Messkurve anzeigen")
|
|
||||||
);
|
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await page.getByRole("cell", { name: "1", exact: true }).click();
|
|
||||||
|
|
||||||
await page.locator(".border.p-2.text-center").first().click();
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
|
||||||
page,
|
|
||||||
page.getByRole("heading", { name: "Einstellungen Messwerteingang" })
|
|
||||||
);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(page, page.getByText("Bezeichnung:"));
|
|
||||||
await highlightAndExpectVisible(page, page.getByText("Offset:"));
|
|
||||||
await highlightAndExpectVisible(page, page.getByText("Faktor:"));
|
|
||||||
await highlightAndExpectVisible(page, page.getByText("Einheit:"));
|
|
||||||
await highlightAndExpectVisible(page, page.getByText("Speicherintervall:"));
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
|
||||||
page,
|
|
||||||
page.getByRole("button", { name: "Speichern" })
|
|
||||||
);
|
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
|
||||||
page,
|
|
||||||
page.getByRole("button", { name: "Modal schließen" })
|
|
||||||
);
|
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
|
||||||
page,
|
|
||||||
page.getByText(
|
|
||||||
"Einstellungen Messwerteingang 1Bezeichnung:Offset:Faktor:Einheit:"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Modal schließen" }).click();
|
|
||||||
|
|
||||||
await page
|
|
||||||
.getByRole("row", { name: "1 126.63 V AE 1 Messkurve" })
|
|
||||||
.getByLabel("Messkurve anzeigen")
|
.getByLabel("Messkurve anzeigen")
|
||||||
.click();
|
);
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await page.getByRole("cell", { name: "1", exact: true }).click();
|
||||||
page,
|
|
||||||
page.getByText(
|
|
||||||
"Messkurve Messwerteingang 1Eingang 1VonBisAlle MesswerteDaten laden"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await page.locator(".border.p-2.text-center").first().click();
|
||||||
page,
|
|
||||||
page.getByRole("heading", { name: "Messkurve Messwerteingang" })
|
|
||||||
);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(page, page.locator("canvas"));
|
await highlightAndExpectVisible(
|
||||||
|
page,
|
||||||
|
page.getByRole("heading", { name: "Einstellungen Messwerteingang" })
|
||||||
|
);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(page, page.getByText("Bezeichnung:"));
|
||||||
page,
|
await highlightAndExpectVisible(page, page.getByText("Offset:"));
|
||||||
page.getByText("Eingang 1VonBisAlle")
|
await highlightAndExpectVisible(page, page.getByText("Faktor:"));
|
||||||
);
|
await highlightAndExpectVisible(page, page.getByText("Einheit:"));
|
||||||
|
await highlightAndExpectVisible(page, page.getByText("Speicherintervall:"));
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("button", { name: "Daten laden" })
|
page.getByRole("button", { name: "Speichern" })
|
||||||
);
|
);
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("button", { name: "Alle Messwerte " })
|
page.getByRole("button", { name: "Modal schließen" })
|
||||||
);
|
);
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
await highlightAndExpectVisible(page, page.getByText("Von"));
|
await highlightAndExpectVisible(
|
||||||
|
page,
|
||||||
|
page.getByText(
|
||||||
|
"Einstellungen Messwerteingang 1Bezeichnung:Offset:Faktor:Einheit:"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
await highlightAndExpectVisible(page, page.getByText("Bis"));
|
await page.getByRole("button", { name: "Modal schließen" }).click();
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await page
|
||||||
page,
|
.getByRole("row", { name: "1 126.63 V AE 1 Messkurve" })
|
||||||
page.locator("div").filter({ hasText: /^Von$/ })
|
.getByLabel("Messkurve anzeigen")
|
||||||
);
|
.click();
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.locator("div").filter({ hasText: /^Von$/ }).getByRole("textbox")
|
page.getByText(
|
||||||
);
|
"Messkurve Messwerteingang 1Eingang 1VonBisAlle MesswerteDaten laden"
|
||||||
await page.waitForTimeout(3000);
|
)
|
||||||
|
);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.locator("div").filter({ hasText: /^Bis$/ })
|
page.getByRole("heading", { name: "Messkurve Messwerteingang" })
|
||||||
);
|
);
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(page, page.locator("canvas"));
|
||||||
page,
|
|
||||||
page.locator("div").filter({ hasText: /^Bis$/ }).getByRole("textbox")
|
|
||||||
);
|
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(page, page.getByRole("img"));
|
await highlightAndExpectVisible(page, page.getByText("Eingang 1VonBisAlle"));
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("button", { name: "Alle Messwerte " })
|
page.getByRole("button", { name: "Daten laden" })
|
||||||
);
|
);
|
||||||
await page.getByRole("button", { name: "Alle Messwerte " }).click();
|
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await page.getByRole("option", { name: "Stündlich" }).click();
|
await highlightAndExpectVisible(
|
||||||
await page.waitForTimeout(3000);
|
page,
|
||||||
|
page.getByRole("button", { name: "Alle Messwerte " })
|
||||||
|
);
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Stündlich" }).click();
|
await highlightAndExpectVisible(page, page.getByText("Von"));
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await page.getByRole("option", { name: "Täglich" }).click();
|
await highlightAndExpectVisible(page, page.getByText("Bis"));
|
||||||
await page.waitForTimeout(3000);
|
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Fullscreen" }).click();
|
await highlightAndExpectVisible(
|
||||||
|
page,
|
||||||
|
page.locator("div").filter({ hasText: /^Von$/ })
|
||||||
|
);
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Exit fullscreen" }).click();
|
await highlightAndExpectVisible(
|
||||||
|
page,
|
||||||
|
page.locator("div").filter({ hasText: /^Von$/ }).getByRole("textbox")
|
||||||
|
);
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("button", { name: "Fullscreen" })
|
page.locator("div").filter({ hasText: /^Bis$/ })
|
||||||
);
|
);
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("button", { name: "Modal schließen" })
|
page.locator("div").filter({ hasText: /^Bis$/ }).getByRole("textbox")
|
||||||
);
|
);
|
||||||
await page.waitForTimeout(3000);
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Modal schließen" }).click();
|
await highlightAndExpectVisible(page, page.getByRole("img"));
|
||||||
});
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
|
await highlightAndExpectVisible(
|
||||||
|
page,
|
||||||
|
page.getByRole("button", { name: "Alle Messwerte " })
|
||||||
|
);
|
||||||
|
await page.getByRole("button", { name: "Alle Messwerte " }).click();
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
|
await page.getByRole("option", { name: "Stündlich" }).click();
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
|
await page.getByRole("button", { name: "Stündlich" }).click();
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
|
await page.getByRole("option", { name: "Täglich" }).click();
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
|
await page.getByRole("button", { name: "Fullscreen" }).click();
|
||||||
|
|
||||||
|
await page.getByRole("button", { name: "Exit fullscreen" }).click();
|
||||||
|
|
||||||
|
await highlightAndExpectVisible(
|
||||||
|
page,
|
||||||
|
page.getByRole("button", { name: "Fullscreen" })
|
||||||
|
);
|
||||||
|
|
||||||
|
await highlightAndExpectVisible(
|
||||||
|
page,
|
||||||
|
page.getByRole("button", { name: "Modal schließen" })
|
||||||
|
);
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
|
await page.getByRole("button", { name: "Modal schließen" }).click();
|
||||||
// ...dein AnalogInputs-Testcode...
|
// ...dein AnalogInputs-Testcode...
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { test, expect } from "../fixtures";
|
|
||||||
import type { Locator, Page } from "@playwright/test";
|
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
|
// Kombinierte Helper-Funktion: injiziert CSS (nur einmal), hebt hervor und prüft Sichtbarkeit
|
||||||
async function highlightAndExpectVisible(
|
async function highlightAndExpectVisible(
|
||||||
@@ -29,8 +28,8 @@ async function highlightAndExpectVisible(
|
|||||||
}
|
}
|
||||||
await expect(locator).toBeVisible();
|
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 page.goto("http://localhost:3000/dashboard");
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
@@ -57,6 +56,7 @@ test("Daschboard-Test", async ({ page }) => {
|
|||||||
page,
|
page,
|
||||||
page.getByRole("cell", { name: "Zeitstempel" })
|
page.getByRole("cell", { name: "Zeitstempel" })
|
||||||
);
|
);
|
||||||
|
// ...existing code...
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("cell", { name: "Quelle" })
|
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.getByText("KUE705FO.PDF"));
|
||||||
await highlightAndExpectVisible(page, page.getByRole("button"));
|
await highlightAndExpectVisible(page, page.getByRole("button"));
|
||||||
await page.getByRole("button").click();
|
await page.getByRole("button").click();
|
||||||
});
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user