test: playwright mit npm run dev erfolgreich

This commit is contained in:
ISA
2025-09-05 10:54:52 +02:00
parent 8c88aa843c
commit 4b83ff01cf
7 changed files with 18 additions and 7 deletions

View File

@@ -94,7 +94,9 @@ export async function runCableMonitoringTest(page: Page) {
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(page, page.getByText("Kabel 1"));
// Use a unique locator to avoid strict mode violation (two elements contain text "Kabel 1").
// The card exposes a title attribute "Kabel 1", so prefer getByTitle for a single match.
await highlightAndExpectVisible(page, page.getByTitle("Kabel 1").first());
await page.waitForTimeout(400);
await highlightAndExpectVisible(
@@ -197,7 +199,11 @@ export async function runCableMonitoringTest(page: Page) {
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(page, page.getByText("Kabel 8"));
// For cable 8 the UI shows a long name and exposes it via title attribute; target it explicitly
await highlightAndExpectVisible(
page,
page.getByTitle("Kabel_8 in Salzgitter bei Hannover").first()
);
await page.waitForTimeout(400);
await page.waitForTimeout(400);