From 680c643ea5bcb41067614996f23a1417071a27c5 Mon Sep 17 00:00:00 2001 From: ISA Date: Wed, 20 Aug 2025 11:30:40 +0200 Subject: [PATCH] feat: install playwright --- .env.development | 2 +- .env.production | 2 +- .../devices/hooks/useDynamicDeviceLayers.js | 4 +- package-lock.json | 62 ++++++++++++++++++- package.json | 4 +- playwright/tests/example.spec.js | 7 +++ test-results/.last-run.json | 4 ++ 7 files changed, 78 insertions(+), 7 deletions(-) create mode 100644 playwright/tests/example.spec.js create mode 100644 test-results/.last-run.json diff --git a/.env.development b/.env.development index ea0e8bd6c..bbd6df056 100644 --- a/.env.development +++ b/.env.development @@ -24,4 +24,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.322 +NEXT_PUBLIC_APP_VERSION=1.1.323 diff --git a/.env.production b/.env.production index 07430574e..a2a333e2e 100644 --- a/.env.production +++ b/.env.production @@ -25,4 +25,4 @@ NEXT_PUBLIC_USE_MOCKS=false # basePath wird jetzt in public/config.json gepflegt # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.1.322 +NEXT_PUBLIC_APP_VERSION=1.1.323 diff --git a/components/devices/hooks/useDynamicDeviceLayers.js b/components/devices/hooks/useDynamicDeviceLayers.js index b644dc634..16f48390f 100644 --- a/components/devices/hooks/useDynamicDeviceLayers.js +++ b/components/devices/hooks/useDynamicDeviceLayers.js @@ -62,11 +62,11 @@ const useDynamicDeviceLayers = (map, GisSystemStatic, mapLayersVisibility, prior marker.addTo(layerRefs.current[key]); }); // Debug: Anzahl Marker in LayerGroup - console.log( + /* console.log( `[DeviceLayers] ${ layerRefs.current[key].getLayers().length } Marker in LayerGroup für ${key}` - ); + ); */ } setMarkerStates(prev => ({ ...prev, [key]: newMarkers })); }, diff --git a/package-lock.json b/package-lock.json index f4c5066d8..e8e8164e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "nodemap", - "version": "1.1.322", + "version": "1.1.323", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nodemap", - "version": "1.1.322", + "version": "1.1.323", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", @@ -29,6 +29,7 @@ "next": "^14.2.5", "nextjs-cors": "^2.2.0", "overlapping-marker-spiderfier-leaflet": "^0.2.7", + "playwright": "^1.54.2", "postcss": "^8.4.40", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -43,6 +44,7 @@ "xml2js": "^0.6.2" }, "devDependencies": { + "@playwright/test": "^1.54.2", "cross-env": "^7.0.3", "husky": "^9.1.7", "identity-obj-proxy": "^3.0.0", @@ -962,6 +964,21 @@ "node": ">=14" } }, + "node_modules/@playwright/test": { + "version": "1.54.2", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.54.2.tgz", + "integrity": "sha512-A+znathYxPf+72riFd1r1ovOLqsIIB0jKIoPjyK2kqEIe30/6jF6BC7QNluHuwUmsD2tv1XZVugN8GqfTMOxsA==", + "devOptional": true, + "dependencies": { + "playwright": "1.54.2" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@popperjs/core": { "version": "2.11.8", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", @@ -4461,6 +4478,47 @@ "node": ">= 6" } }, + "node_modules/playwright": { + "version": "1.54.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.54.2.tgz", + "integrity": "sha512-Hu/BMoA1NAdRUuulyvQC0pEqZ4vQbGfn8f7wPXcnqQmM+zct9UliKxsIkLNmz/ku7LElUNqmaiv1TG/aL5ACsw==", + "dependencies": { + "playwright-core": "1.54.2" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.54.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.54.2.tgz", + "integrity": "sha512-n5r4HFbMmWsB4twG7tJLDN9gmBUeSPcsBZiWSE4DnYz9mJMAFqr2ID7+eGC9kpEnxExJ1epttwR59LEWCk8mtA==", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/playwright/node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/postcss": { "version": "8.5.4", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.4.tgz", diff --git a/package.json b/package.json index e41cc7fb6..6dd34d6b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodemap", - "version": "1.1.322", + "version": "1.1.323", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", @@ -23,6 +23,7 @@ "next": "^14.2.5", "nextjs-cors": "^2.2.0", "overlapping-marker-spiderfier-leaflet": "^0.2.7", + "playwright": "^1.54.2", "postcss": "^8.4.40", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -50,6 +51,7 @@ "bump-version": "node ./scripts/bumpVersion.js" }, "devDependencies": { + "@playwright/test": "^1.54.2", "cross-env": "^7.0.3", "husky": "^9.1.7", "identity-obj-proxy": "^3.0.0", diff --git a/playwright/tests/example.spec.js b/playwright/tests/example.spec.js new file mode 100644 index 000000000..3f219c7a2 --- /dev/null +++ b/playwright/tests/example.spec.js @@ -0,0 +1,7 @@ +// example.spec.js +const { test, expect } = require("@playwright/test"); + +test("simple test", async ({ page }) => { + await page.goto("https://playwright.dev"); + await expect(page).toHaveTitle(/Playwright/); +}); diff --git a/test-results/.last-run.json b/test-results/.last-run.json new file mode 100644 index 000000000..cbcc1fbac --- /dev/null +++ b/test-results/.last-run.json @@ -0,0 +1,4 @@ +{ + "status": "passed", + "failedTests": [] +} \ No newline at end of file