fix: playwright Test bugs beheben
This commit is contained in:
@@ -9,9 +9,9 @@ import { runSystemTest } from "./pages/system/systemTest";
|
||||
import { runSettingsPageTest } from "./pages/settingsPage/settingsPageTest";
|
||||
|
||||
test("Dashboard, AnalogInputs und SettingsPage", async ({ page }) => {
|
||||
// await runDashboardTest(page);
|
||||
// await runCableMonitoringTest(page);
|
||||
// await runDigitalInputsTest(page);
|
||||
await runDashboardTest(page);
|
||||
await runCableMonitoringTest(page);
|
||||
await runDigitalInputsTest(page);
|
||||
await runDigitalOutputsTest(page);
|
||||
await runAnalogInputsTest(page);
|
||||
await runMeldungenTest(page);
|
||||
|
||||
@@ -128,17 +128,18 @@ export async function runAnalogInputsTest(page: Page) {
|
||||
.getByLabel("Messkurve anzeigen")
|
||||
);
|
||||
|
||||
await page.getByRole("cell", { name: "1", exact: true }).click();
|
||||
await expect(page.locator(".border.p-2.text-center").first()).toBeVisible();
|
||||
|
||||
await page.locator(".border.p-2.text-center").first().click();
|
||||
// Einstellungen-Button in der ersten Datenzeile klicken und auf Modal warten
|
||||
const firstRow = page.getByRole("row", { name: /1\s+.*AE\s*1/i });
|
||||
const settingsButtonInRow = firstRow.getByRole("button").first();
|
||||
await settingsButtonInRow.waitFor({ state: "visible", timeout: 10000 });
|
||||
await settingsButtonInRow.click();
|
||||
await expect(
|
||||
page.getByRole("heading", { name: "Einstellungen Messwerteingang" })
|
||||
page.getByRole("heading", { name: /Einstellungen Messwerteingang/ })
|
||||
).toBeVisible({ timeout: 15000 });
|
||||
|
||||
await highlightAndExpectVisible(
|
||||
page,
|
||||
page.getByRole("heading", { name: "Einstellungen Messwerteingang" })
|
||||
page.getByRole("heading", { name: /Einstellungen Messwerteingang/ })
|
||||
);
|
||||
|
||||
await highlightAndExpectVisible(page, page.getByText("Bezeichnung:"));
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Page } from "@playwright/test";
|
||||
import { expect } from "@playwright/test";
|
||||
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
|
||||
import { navTest } from "@playwright/components/navTest";
|
||||
import { headerTest } from "@playwright/components/headerTest";
|
||||
@@ -52,22 +53,4 @@ export async function runDigitalOutputsTest(page: Page) {
|
||||
page.getByRole("cell", { name: "3", exact: true }).click();
|
||||
page.getByRole("cell", { name: "4", exact: true }).locator("svg").click();
|
||||
page.getByRole("cell", { name: "4", exact: true }).click();
|
||||
page.getByRole("cell", { name: "Ausgang2" }).first().click();
|
||||
|
||||
page.getByRole("row", { name: "1 Ausgang2" }).locator("path").nth(1).click();
|
||||
page.getByRole("row", { name: "1 Ausgang2" }).locator("path").nth(1).click();
|
||||
page.getByRole("row", { name: "2 Ausgang2" }).locator("path").nth(1).click();
|
||||
page.getByRole("row", { name: "2 Ausgang2" }).locator("svg").nth(1).click();
|
||||
page.getByRole("row", { name: "1 Ausgang2" }).locator("path").nth(2).click();
|
||||
page.getByRole("row", { name: "1 Ausgang2" }).locator("svg").nth(2).click();
|
||||
page.getByRole("button", { name: "Modal schließen" }).click();
|
||||
page.getByRole("row", { name: "2 Ausgang2" }).locator("svg").nth(2).click();
|
||||
page.getByRole("button", { name: "Modal schließen" }).click();
|
||||
page.getByRole("row", { name: "1 Ausgang2" }).locator("svg").nth(2).click();
|
||||
page.getByRole("heading", { name: "Einstellungen Schaltausgang" }).click();
|
||||
page.getByText("Bezeichnung:").click();
|
||||
page.getByRole("textbox", { name: "z. B. Licht Relais" }).click();
|
||||
|
||||
page.getByRole("button", { name: "Modal schließen" }).click();
|
||||
page.getByRole("row", { name: "2 Ausgang2" }).locator("path").nth(2).click();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user