From 1e9dfa3e7097038a0f1b694c56f56b95b25c495f Mon Sep 17 00:00:00 2001 From: philipp Date: Mon, 2 Sep 2024 14:07:43 +0300 Subject: [PATCH] fix frontend tests --- frontend/tests/cox.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/tests/cox.spec.ts b/frontend/tests/cox.spec.ts index 5272a58..1548f4e 100644 --- a/frontend/tests/cox.spec.ts +++ b/frontend/tests/cox.spec.ts @@ -56,7 +56,7 @@ test.describe("cox can edit trips", () => { await sharedPage.locator("#sidebar #notes").click(); await sharedPage.locator("#sidebar #notes").fill("Meine Anmerkung"); await sharedPage.getByRole("button", { name: "Speichern" }).click(); - await sharedPage.getByRole("link", { name: "Details" }).click(); + await sharedPage.getByRole("link", { name: "Details" }).nth(1).click(); await expect(sharedPage.locator("#sidebar")).toContainText( "Meine Anmerkung", ); @@ -68,7 +68,7 @@ test.describe("cox can edit trips", () => { test("add and remove guest", async () => { await sharedPage.goto("/planned"); - await sharedPage.getByRole("link", { name: "Details" }).click(); + await sharedPage.getByRole("link", { name: "Details" }).nth(1).click(); await sharedPage.locator("#sidebar #user_note").click(); await sharedPage.locator("#sidebar #user_note").fill("Mein Gast"); await sharedPage.getByRole("button", { name: "Gast hinzufügen" }).click(); @@ -108,7 +108,7 @@ test.describe("cox can edit trips", () => { test("change amount rower", async () => { await sharedPage.goto("/planned"); - await sharedPage.getByRole("link", { name: "Details" }).click(); + await sharedPage.getByRole("link", { name: "Details" }).nth(1).click(); await expect(sharedPage.locator("#sidebar")).toContainText( "Freie Plätze: 5", ); @@ -122,7 +122,7 @@ test.describe("cox can edit trips", () => { test("call off trip", async () => { await sharedPage.goto("/planned"); - await sharedPage.getByRole("link", { name: "Details" }).click(); + await sharedPage.getByRole("link", { name: "Details" }).nth1(1).click(); await expect(sharedPage.locator("#sidebar")).toContainText( "Freie Plätze: 3", );