test: playwright test passed

This commit is contained in:
ISA
2025-09-17 13:44:20 +02:00
parent 4a42c428f0
commit e52b0cc520
5 changed files with 16 additions and 11 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
# basePath wird jetzt in public/config.json gepflegt
# App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.1.388
NEXT_PUBLIC_APP_VERSION=1.1.389

View File

@@ -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.388
NEXT_PUBLIC_APP_VERSION=1.1.389

4
package-lock.json generated
View File

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

View File

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

View File

@@ -140,14 +140,19 @@ test("MapComponent", async ({ page }) => {
await page.locator("#m_textboxPassword_I").fill("admin");
await page.getByRole("cell", { name: "Anmelden Anmelden" }).locator("span").click();
console.log("Login auf 13.er TALAS erfolgreich");
//warte 10 Sekunden
await page.waitForTimeout(10000);
await page.waitForTimeout(3000);
await page.goto("http://localhost:3000/?m=12&u=484");
const page1Promise = page.waitForEvent("popup");
await page.getByLabel("Alarm aktiv").locator("path").click();
const page1 = await page1Promise;
// Warte auf neues Tab nach Klick auf Alarm-Link
const [newPage] = await Promise.all([
page.context().waitForEvent("page"),
page.getByLabel("Alarm aktiv").click(),
]);
await newPage.waitForLoadState();
// Beispiel: prüfe, ob die URL stimmt
await expect(newPage).toHaveURL(/cpl\.aspx/);
// Optional: prüfe Text auf der neuen Seite
await expect(
page1.getByText("Standort Rastede > Bereich Littwin > TALAS CPL V3.5", { exact: true })
newPage.getByText("Standort Rastede > Bereich Littwin > TALAS CPL V3.5", { exact: true })
).toBeVisible();
});