From 374fed9e3bdcee30a3f8315d1f0c392204a885df Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Tue, 6 May 2025 08:50:45 +0200 Subject: [PATCH] fix tests by clicking on boat name instead of cox --- frontend/tests/log.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/tests/log.spec.ts b/frontend/tests/log.spec.ts index 70aad24..626a597 100644 --- a/frontend/tests/log.spec.ts +++ b/frontend/tests/log.spec.ts @@ -224,7 +224,7 @@ test("Kiosk can start and finish trip", async ({ page }, testInfo) => { await page.getByPlaceholder("Passwort").press("Enter"); await page.goto("/log/show"); - await page.getByText('(cox2)').click(); + await page.getByRole('link', { name: 'Joe' }).nth(1).click(); page.once("dialog", (dialog) => { dialog.accept().catch(() => {}); }); @@ -300,7 +300,7 @@ test("Cox can start and finish trip with cox steering only", async ({ page }, te await page.getByPlaceholder("Passwort").press("Enter"); await page.goto("/log/show"); - await page.getByText('(cox2 - handgesteuert)').click(); + await page.getByRole("link", { name: "cox_only_steering_boat" }).click(); page.once("dialog", (dialog) => { dialog.accept().catch(() => {}); }); @@ -369,7 +369,7 @@ test("Kiosk can start and finish trip in one stop", async ({ page }, testInfo) = await page.getByPlaceholder("Passwort").press("Enter"); await page.goto("/log/show"); - await page.getByText('(cox2)').click(); + await page.getByRole('link', { name: 'Joe' }).nth(1).click(); page.once("dialog", (dialog) => { dialog.accept().catch(() => {}); });