Compare commits

..

2 Commits

Author SHA1 Message Date
b3779bfefd Merge pull request 'faster tests' (#238) from staging into main
Some checks failed
CI/CD Pipeline / deploy-staging (push) Blocked by required conditions
CI/CD Pipeline / deploy-main (push) Blocked by required conditions
CI/CD Pipeline / test (push) Has been cancelled
Reviewed-on: #238
2024-03-05 00:46:42 +01:00
212ef5faa7 faster tests
Some checks failed
CI/CD Pipeline / deploy-staging (push) Blocked by required conditions
CI/CD Pipeline / deploy-main (push) Blocked by required conditions
CI/CD Pipeline / test (push) Has been cancelled
2024-03-05 00:46:19 +01:00

View File

@ -29,7 +29,7 @@ test("cox can create and delete trip", async ({ page }) => {
test.describe("cox can edit trips", () => { test.describe("cox can edit trips", () => {
let sharedPage: Page; let sharedPage: Page;
test.beforeEach(async ({ browser }) => { test.beforeAll(async ({ browser }) => {
const page = await browser.newPage(); const page = await browser.newPage();
await page.goto("http://localhost:8000/auth"); 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.goto("http://localhost:8000/planned");
await sharedPage.getByRole("link", { name: "Details" }).click(); await sharedPage.getByRole("link", { name: "Details" }).click();
await expect(sharedPage.locator("#sidebar")).toContainText( await expect(sharedPage.locator("#sidebar")).toContainText(
"Freie Plätze: 5", "Freie Plätze: 3",
); );
await sharedPage.getByRole("spinbutton").click(); await sharedPage.getByRole("spinbutton").click();
await sharedPage.getByRole("spinbutton").fill("0"); await sharedPage.getByRole("spinbutton").fill("0");
@ -135,7 +135,7 @@ test.describe("cox can edit trips", () => {
await expect(sharedPage.locator("body")).toContainText("(Absage cox)"); await expect(sharedPage.locator("body")).toContainText("(Absage cox)");
}); });
test.afterEach(async () => { test.afterAll(async () => {
await sharedPage.goto("http://localhost:8000/planned"); await sharedPage.goto("http://localhost:8000/planned");
await sharedPage.getByRole("link", { name: "Details" }).click(); await sharedPage.getByRole("link", { name: "Details" }).click();
await sharedPage.getByRole("link", { name: "Termin löschen" }).click(); await sharedPage.getByRole("link", { name: "Termin löschen" }).click();