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 # 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.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 # basePath wird jetzt in public/config.json gepflegt
# App-Versionsnummer # 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", "name": "nodemap",
"version": "1.1.388", "version": "1.1.389",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "nodemap", "name": "nodemap",
"version": "1.1.388", "version": "1.1.389",
"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.388", "version": "1.1.389",
"dependencies": { "dependencies": {
"@emotion/react": "^11.13.3", "@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0", "@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.locator("#m_textboxPassword_I").fill("admin");
await page.getByRole("cell", { name: "Anmelden Anmelden" }).locator("span").click(); await page.getByRole("cell", { name: "Anmelden Anmelden" }).locator("span").click();
console.log("Login auf 13.er TALAS erfolgreich"); console.log("Login auf 13.er TALAS erfolgreich");
//warte 10 Sekunden await page.waitForTimeout(3000);
await page.waitForTimeout(10000);
await page.goto("http://localhost:3000/?m=12&u=484"); await page.goto("http://localhost:3000/?m=12&u=484");
const page1Promise = page.waitForEvent("popup"); // Warte auf neues Tab nach Klick auf Alarm-Link
await page.getByLabel("Alarm aktiv").locator("path").click(); const [newPage] = await Promise.all([
const page1 = await page1Promise; 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( 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(); ).toBeVisible();
}); });