From 3c6e938949e5da134408e3584ba20e89aaef7a30 Mon Sep 17 00:00:00 2001 From: philipp Date: Mon, 2 Sep 2024 14:10:39 +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 1548f4e..d91c26b 100644 --- a/frontend/tests/cox.spec.ts +++ b/frontend/tests/cox.spec.ts @@ -75,7 +75,7 @@ test.describe("cox can edit trips", () => { await expect(sharedPage.locator("body")).toContainText( "Erfolgreich angemeldet!", ); - 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: 4", ); @@ -90,7 +90,7 @@ test.describe("cox can edit trips", () => { await expect(sharedPage.locator("body")).toContainText( "Erfolgreich abgemeldet!", ); - 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" }).nth1(1).click(); + await sharedPage.getByRole("link", { name: "Details" }).nth(1).click(); await expect(sharedPage.locator("#sidebar")).toContainText( "Freie Plätze: 3", );