From 81b63798957aa5ff45d6fed53636f9a34c2d6f1a Mon Sep 17 00:00:00 2001 From: ISA Date: Tue, 16 Sep 2025 15:50:53 +0200 Subject: [PATCH] test(e2e): Playwright tests passing --- .env.development | 2 +- .env.production | 2 +- package-lock.json | 4 +- package.json | 2 +- playwright/tests/mapcomponent.spec.js | 334 ++++++-------------------- 5 files changed, 76 insertions(+), 268 deletions(-) diff --git a/.env.development b/.env.development index a08e4848a..5fa39d2bb 100644 --- a/.env.development +++ b/.env.development @@ -23,4 +23,4 @@ NEXT_PUBLIC_USE_MOCKS=true # z.B. http://10.10.0.13/xyz/index.aspx -> basePath in config.json auf /xyz setzen # basePath wird jetzt in public/config.json gepflegt # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.1.380 +NEXT_PUBLIC_APP_VERSION=1.1.381 diff --git a/.env.production b/.env.production index aa774cfcc..1a2a5a3c8 100644 --- a/.env.production +++ b/.env.production @@ -24,4 +24,4 @@ NEXT_PUBLIC_USE_MOCKS=false # basePath wird jetzt in public/config.json gepflegt # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.1.380 +NEXT_PUBLIC_APP_VERSION=1.1.381 diff --git a/package-lock.json b/package-lock.json index 233fffc69..931af5ef3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "nodemap", - "version": "1.1.380", + "version": "1.1.381", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nodemap", - "version": "1.1.380", + "version": "1.1.381", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", diff --git a/package.json b/package.json index 717ae2ef3..4b153759a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodemap", - "version": "1.1.380", + "version": "1.1.381", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", diff --git a/playwright/tests/mapcomponent.spec.js b/playwright/tests/mapcomponent.spec.js index 053609103..40026ba9a 100644 --- a/playwright/tests/mapcomponent.spec.js +++ b/playwright/tests/mapcomponent.spec.js @@ -1,302 +1,110 @@ import { test, expect } from "@playwright/test"; -/** - * Helper: Pan the Leaflet map by simulating a mouse drag and wait until - * mapCenter in localStorage changes (MapComponent persists center on move/zoom). - * - * Note for codegen: The recorder oft erfasst Klicks statt Drag. Ersetze - * die aufgenommenen Klicks nachträglich durch diesen Helper für verlässliches Panning. - */ -async function panMap(page, deltaY = -200) { - const map = page.locator("#map"); - await map.waitFor({ state: "visible" }); - // Wait until Leaflet initializes the container class - await page.locator("#map.leaflet-container").waitFor({ state: "visible", timeout: 20_000 }); - - const centerBefore = await page.evaluate(() => { - try { - const v = localStorage.getItem("mapCenter"); - return v ? JSON.parse(v) : null; - } catch { - return null; +// Helper: robust selection for native