test: Layers visibility

This commit is contained in:
ISA
2025-09-17 14:25:36 +02:00
parent 7faee5fd79
commit c112ec2da4
5 changed files with 27 additions and 10 deletions

View File

@@ -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 # 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 # basePath wird jetzt in public/config.json gepflegt
# App-Versionsnummer # App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.1.390 NEXT_PUBLIC_APP_VERSION=1.1.391

View File

@@ -24,4 +24,4 @@ NEXT_PUBLIC_USE_MOCKS=false
# basePath wird jetzt in public/config.json gepflegt # basePath wird jetzt in public/config.json gepflegt
# App-Versionsnummer # App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.1.390 NEXT_PUBLIC_APP_VERSION=1.1.391

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "nodemap", "name": "nodemap",
"version": "1.1.390", "version": "1.1.391",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "nodemap", "name": "nodemap",
"version": "1.1.390", "version": "1.1.391",
"dependencies": { "dependencies": {
"@emotion/react": "^11.13.3", "@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0", "@emotion/styled": "^11.13.0",

View File

@@ -1,6 +1,6 @@
{ {
"name": "nodemap", "name": "nodemap",
"version": "1.1.390", "version": "1.1.391",
"dependencies": { "dependencies": {
"@emotion/react": "^11.13.3", "@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0", "@emotion/styled": "^11.13.0",

View File

@@ -83,9 +83,28 @@ test("MapComponent", async ({ page }) => {
// 2) Optional: verify a key from localStorage at runtime // 2) Optional: verify a key from localStorage at runtime
await expect(page.evaluate(() => localStorage.getItem("showLayersPanel"))).resolves.toBe("false"); await expect(page.evaluate(() => localStorage.getItem("showLayersPanel"))).resolves.toBe("false");
// 3) Layer-Panel toggle: expect "einblenden" first (since showLayersPanel=false), then toggle // 3) Layer-Panel toggle / Hamburger menu: expect "einblenden" first (since showLayersPanel=false), then toggle
await expect(page.getByRole("button", { name: "Layer-Panel einblenden" })).toBeVisible(); await expect(page.getByRole("button", { name: "Layer-Panel einblenden" })).toBeVisible();
await page.getByRole("button", { name: "Layer-Panel einblenden" }).click(); await page.getByRole("button", { name: "Layer-Panel einblenden" }).click();
//----Layers Panel
await expect(page.locator("#mainDataSheet")).toBeVisible();
await expect(page.getByText("TALAS", { exact: true })).toBeVisible();
await expect(page.getByText("Kabelstrecken")).toBeVisible();
await expect(page.getByText("ULAF")).toBeVisible();
await expect(page.getByText("GSM Modem")).toBeVisible();
await expect(page.getByText("Cisco Router")).toBeVisible();
await expect(page.getByText("WAGO")).toBeVisible();
await expect(page.getByText("Siemens")).toBeVisible();
await expect(page.getByText("OTDR")).toBeVisible();
await expect(page.getByText("WDM")).toBeVisible();
await expect(page.getByText("GMA")).toBeVisible();
await expect(page.getByText("TK-Komponenten")).toBeVisible();
await expect(page.getByText("TALAS ICL")).toBeVisible();
await expect(page.getByText("DAUZ")).toBeVisible();
await expect(page.getByText("SMS Modem")).toBeVisible();
await expect(page.getByText("Sonstige")).toBeVisible();
await expect(page.getByText("POIs")).toBeVisible();
//-------------------------------
await expect(page.getByRole("button", { name: "Layer-Panel ausblenden" })).toBeVisible(); await expect(page.getByRole("button", { name: "Layer-Panel ausblenden" })).toBeVisible();
// 4) Collapse again to restore state // 4) Collapse again to restore state
await page.getByRole("button", { name: "Layer-Panel ausblenden" }).click(); await page.getByRole("button", { name: "Layer-Panel ausblenden" }).click();
@@ -98,6 +117,8 @@ test("MapComponent", async ({ page }) => {
await expect(page.getByRole("button", { name: "Info einblenden" })).toBeVisible(); await expect(page.getByRole("button", { name: "Info einblenden" })).toBeVisible();
await page.getByRole("button", { name: "Info einblenden" }).click(); await page.getByRole("button", { name: "Info einblenden" }).click();
await expect(page.locator("div").filter({ hasText: "TALAS.Map Version" }).nth(3)).toBeVisible(); await expect(page.locator("div").filter({ hasText: "TALAS.Map Version" }).nth(3)).toBeVisible();
await page.locator("div:nth-child(2) > button").click(); //inso klicken in der InfoCard
await page.getByRole("button", { name: "Schließen" }).click(); // close info card/Modal
// 6) Koordinatensuche toggle // 6) Koordinatensuche toggle
await page.getByRole("button", { name: "Koordinatensuche einblenden" }).click(); await page.getByRole("button", { name: "Koordinatensuche einblenden" }).click();
@@ -115,14 +136,10 @@ test("MapComponent", async ({ page }) => {
// Prüfe, ob die gewünschten Optionen existieren (attached) // Prüfe, ob die gewünschten Optionen existieren (attached)
await expect(select.locator('option[value="50977"]')).toBeAttached(); await expect(select.locator('option[value="50977"]')).toBeAttached();
await expect(select.locator('option[value="50986"]')).toBeAttached(); await expect(select.locator('option[value="50986"]')).toBeAttached();
// ----------------------------------------------
await selectStation(page, "50977"); await selectStation(page, "50977");
await page.getByLabel("Marker").click(); await page.getByLabel("Marker").click();
await selectStation(page, "50986"); await selectStation(page, "50986");
await page.getByLabel("Marker").click(); await page.getByLabel("Marker").click();
await page.getByLabel("Marker").click();
await page.getByLabel("Marker").click();
await selectStation(page, "50977"); await selectStation(page, "50977");
await page.getByRole("button", { name: "Karte auf Standardansicht" }).click(); await page.getByRole("button", { name: "Karte auf Standardansicht" }).click();
//minusIcon //minusIcon