From bb2771b41295120e3c3a301215cd4026272f57f7 Mon Sep 17 00:00:00 2001 From: philipp Date: Mon, 2 Sep 2024 13:52:35 +0300 Subject: [PATCH] fix frontend tests --- frontend/tests/cox.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/tests/cox.spec.ts b/frontend/tests/cox.spec.ts index d38dc96..8d545c0 100644 --- a/frontend/tests/cox.spec.ts +++ b/frontend/tests/cox.spec.ts @@ -18,7 +18,7 @@ test("cox can create and delete trip", async ({ page }) => { await expect(page.locator("body")).toContainText("18:00 Uhr (cox) Details"); await page.goto("/planned"); - await page.getByRole("link", { name: "Details" }).click(); + await page.getByRole('link', { name: 'Details' }).nth(1).click(); await page.getByRole("link", { name: "Termin löschen" }).click(); await expect(page.locator("body")).toContainText("Erfolgreich gelöscht!"); }); @@ -52,7 +52,7 @@ test.describe("cox can edit trips", () => { test("edit remarks", async () => { await sharedPage.goto("/planned"); - await sharedPage.getByRole("link", { name: "Details" }).click(); + await page.getByRole('link', { name: 'Details' }).nth(1).click(); await sharedPage.locator("#sidebar #notes").click(); await sharedPage.locator("#sidebar #notes").fill("Meine Anmerkung"); await sharedPage.getByRole("button", { name: "Speichern" }).click(); @@ -137,7 +137,7 @@ test.describe("cox can edit trips", () => { test.afterAll(async () => { await sharedPage.goto("/planned"); - await sharedPage.getByRole("link", { name: "Details" }).click(); + await sharedPage.getByRole('link', { name: 'Details' }).nth(1).click(); await sharedPage.getByRole("link", { name: "Termin löschen" }).click(); await sharedPage.close(); });