From 212ef5faa77634bbd04ed8b36a82215019473b5e Mon Sep 17 00:00:00 2001 From: philipp Date: Tue, 5 Mar 2024 00:46:19 +0100 Subject: [PATCH] faster 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 5b047b1..126bd03 100644 --- a/frontend/tests/cox.spec.ts +++ b/frontend/tests/cox.spec.ts @@ -29,7 +29,7 @@ test("cox can create and delete trip", async ({ page }) => { test.describe("cox can edit trips", () => { let sharedPage: Page; - test.beforeEach(async ({ browser }) => { + test.beforeAll(async ({ browser }) => { const page = await browser.newPage(); await page.goto("http://localhost:8000/auth"); @@ -124,7 +124,7 @@ test.describe("cox can edit trips", () => { await sharedPage.goto("http://localhost:8000/planned"); await sharedPage.getByRole("link", { name: "Details" }).click(); await expect(sharedPage.locator("#sidebar")).toContainText( - "Freie Plätze: 5", + "Freie Plätze: 3", ); await sharedPage.getByRole("spinbutton").click(); await sharedPage.getByRole("spinbutton").fill("0"); @@ -135,7 +135,7 @@ test.describe("cox can edit trips", () => { await expect(sharedPage.locator("body")).toContainText("(Absage cox)"); }); - test.afterEach(async () => { + test.afterAll(async () => { await sharedPage.goto("http://localhost:8000/planned"); await sharedPage.getByRole("link", { name: "Details" }).click(); await sharedPage.getByRole("link", { name: "Termin löschen" }).click();