test: Test pass

This commit is contained in:
ISA
2025-09-17 12:13:03 +02:00
parent ea6d71a4f5
commit dd9980409c
6 changed files with 33 additions and 6 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.385
NEXT_PUBLIC_APP_VERSION=1.1.386

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.385
NEXT_PUBLIC_APP_VERSION=1.1.386

View File

@@ -171,7 +171,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
staticObj.Link.startsWith("http://") || staticObj.Link.startsWith("https://");
alarmLink = isAbsolute
? staticObj.Link
: //: `${window.location.origin}/talas5/devices/${staticObj.Link}`;
: // : `${window.location.origin}/talas5/devices/${staticObj.Link}`;
`http://10.10.0.13/talas5/devices/${staticObj.Link}`; // nur zum Testen
}
}

4
package-lock.json generated
View File

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

View File

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

View File

@@ -29,6 +29,14 @@ async function selectStation(page, value) {
}
test("MapComponent", async ({ page }) => {
// Login auf 13.er TALAS
await page.goto("http://10.10.0.13/talas5/login.aspx");
await page.locator("#m_textboxUserName_I").click();
await page.locator("#m_textboxUserName_I").fill("admin");
await page.locator("#m_textboxUserName_I").press("Tab");
await page.locator("#m_textboxPassword_I").fill("admin");
await page.getByRole("cell", { name: "Anmelden Anmelden" }).locator("span").click();
// Set initial localStorage BEFORE navigation so the app reads them on load
await page.addInitScript(() => {
localStorage.setItem("editMode", "false");
@@ -122,6 +130,25 @@ test("MapComponent", async ({ page }) => {
//wait 3 seconds
// plusIcon
await page.getByTestId("zoom-in").click(); //plus
//--------------------------------------------
// Prüfe Alarm-Icon
await page.goto("http://10.10.0.13/talas5/login.aspx");
await page.locator("#m_textboxUserName_I").click();
await page.locator("#m_textboxUserName_I").fill("admin");
await page.locator("#m_textboxUserName_I").press("Tab");
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.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;
await expect(
page1.getByText("Standort Rastede > Bereich Littwin > TALAS CPL V3.5", { exact: true })
).toBeVisible();
});
/* Powershell Befehl ->das führt langsam aus mit 1 Sekunde Pause zwischen den Aktionen