playwright: test Reihenfolge

This commit is contained in:
ISA
2025-08-14 16:20:42 +02:00
parent 3e0b1e98bb
commit 5e9c7e9bfe
7 changed files with 236 additions and 255 deletions

View File

@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
NEXT_PUBLIC_EXPORT_STATIC=false
NEXT_PUBLIC_USE_CGI=false
# 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)

View File

@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
NEXT_PUBLIC_EXPORT_STATIC=true
NEXT_PUBLIC_USE_CGI=true
# App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.6.726
NEXT_PUBLIC_APP_VERSION=1.6.727
NEXT_PUBLIC_CPL_MODE=production

View File

@@ -1,3 +1,8 @@
## [1.6.727] 2025-08-14
- playwright: Reihenfolge
---
## [1.6.726] 2025-08-14
- playwright: dashboard

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "cpl-v4",
"version": "1.6.726",
"version": "1.6.727",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "cpl-v4",
"version": "1.6.726",
"version": "1.6.727",
"dependencies": {
"@fontsource/roboto": "^5.1.0",
"@headlessui/react": "^2.2.4",

View File

@@ -1,6 +1,6 @@
{
"name": "cpl-v4",
"version": "1.6.726",
"version": "1.6.727",
"private": true,
"scripts": {
"dev": "next dev",

View File

@@ -1,7 +1,6 @@
import { test, expect } from "../fixtures";
import { expect } from "../fixtures";
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
async function highlightAndExpectVisible(
page: Page,
@@ -30,35 +29,17 @@ export async function runAnalogInputsTest(page: Page) {
await expect(locator).toBeVisible();
}
/*
import { test, expect } from "../fixtures";
npx playwright codegen http://localhost:3000/analogInputs --target=ts -o tests/e2e/analog-inputs.spec.ts
ob ein Element sichtbar ist dann Auge Icon klicken
ansonsten nimmt automatich die klicks auf
//----------------------------------------------
Zum ausführen
alle Test datei , je nach dem wie in package.json definiert ist
npm run test:e2e:ui
bestimmte datei
npm run test:e2e:ui -- tests/analogInputs.spec.ts
npm run test:e2e:ui -- tests/e2e/analog-inputs.spec.ts
*/
test.slow();
test("Messwerteingänge", async ({ page }) => {
export async function runAnalogInputsTest(page: Page) {
await page.goto("/analogInputs");
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Messwerteingänge" }).nth(1)
);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Eingang" })
);
// ...existing code...
await highlightAndExpectVisible(
page,
@@ -211,10 +192,7 @@ export async function runAnalogInputsTest(page: Page) {
await highlightAndExpectVisible(page, page.locator("canvas"));
await highlightAndExpectVisible(
page,
page.getByText("Eingang 1VonBisAlle")
);
await highlightAndExpectVisible(page, page.getByText("Eingang 1VonBisAlle"));
await highlightAndExpectVisible(
page,
@@ -288,7 +266,5 @@ export async function runAnalogInputsTest(page: Page) {
await page.waitForTimeout(3000);
await page.getByRole("button", { name: "Modal schließen" }).click();
});
// ...dein AnalogInputs-Testcode...
}

View File

@@ -1,6 +1,5 @@
import { test, expect } from "../fixtures";
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
async function highlightAndExpectVisible(
@@ -29,8 +28,8 @@ async function highlightAndExpectVisible(
}
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 highlightAndExpectVisible(
page,
@@ -57,6 +56,7 @@ test("Daschboard-Test", async ({ page }) => {
page,
page.getByRole("cell", { name: "Zeitstempel" })
);
// ...existing code...
await highlightAndExpectVisible(
page,
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.getByRole("button"));
await page.getByRole("button").click();
});
}