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

@@ -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