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,13 +1,12 @@
|
|||||||
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({
|
||||||
@@ -28,37 +27,19 @@ export async function runAnalogInputsTest(page: Page) {
|
|||||||
}, durationMs);
|
}, durationMs);
|
||||||
}
|
}
|
||||||
await expect(locator).toBeVisible();
|
await expect(locator).toBeVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
export async function runAnalogInputsTest(page: Page) {
|
||||||
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 }) => {
|
|
||||||
await page.goto("/analogInputs");
|
await page.goto("/analogInputs");
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("heading", { name: "Messwerteingänge" }).nth(1)
|
page.getByRole("heading", { name: "Messwerteingänge" }).nth(1)
|
||||||
);
|
);
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
page.getByRole("cell", { name: "Eingang" })
|
page.getByRole("cell", { name: "Eingang" })
|
||||||
);
|
);
|
||||||
|
// ...existing code...
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
@@ -211,10 +192,7 @@ export async function runAnalogInputsTest(page: Page) {
|
|||||||
|
|
||||||
await highlightAndExpectVisible(page, page.locator("canvas"));
|
await highlightAndExpectVisible(page, page.locator("canvas"));
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(page, page.getByText("Eingang 1VonBisAlle"));
|
||||||
page,
|
|
||||||
page.getByText("Eingang 1VonBisAlle")
|
|
||||||
);
|
|
||||||
|
|
||||||
await highlightAndExpectVisible(
|
await highlightAndExpectVisible(
|
||||||
page,
|
page,
|
||||||
@@ -288,7 +266,5 @@ export async function runAnalogInputsTest(page: Page) {
|
|||||||
await page.waitForTimeout(3000);
|
await page.waitForTimeout(3000);
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Modal schließen" }).click();
|
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