wait for webserver to respond with 2xx, fix failing first (flaky) test
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { test, expect, Page } from "@playwright/test";
|
||||
|
||||
test("cox can create and delete trip", async ({ page }) => {
|
||||
await page.goto("http://localhost:8000/auth");
|
||||
await page.goto("/auth");
|
||||
await page.getByPlaceholder("Name").click();
|
||||
await page.getByPlaceholder("Name").fill("cox");
|
||||
await page.getByPlaceholder("Name").press("Tab");
|
||||
@ -17,7 +17,7 @@ test("cox can create and delete trip", async ({ page }) => {
|
||||
await page.getByRole("button", { name: "Erstellen", exact: true }).click();
|
||||
await expect(page.locator("body")).toContainText("18:00 Uhr (cox) Details");
|
||||
|
||||
await page.goto("http://localhost:8000/planned");
|
||||
await page.goto("/planned");
|
||||
await page.getByRole("link", { name: "Details" }).click();
|
||||
await page.getByRole("link", { name: "Termin löschen" }).click();
|
||||
await expect(page.locator("body")).toContainText("Erfolgreich gelöscht!");
|
||||
@ -32,7 +32,7 @@ test.describe("cox can edit trips", () => {
|
||||
test.beforeAll(async ({ browser }) => {
|
||||
const page = await browser.newPage();
|
||||
|
||||
await page.goto("http://localhost:8000/auth");
|
||||
await page.goto("/auth");
|
||||
await page.getByPlaceholder("Name").click();
|
||||
await page.getByPlaceholder("Name").fill("cox");
|
||||
await page.getByPlaceholder("Name").press("Tab");
|
||||
@ -51,7 +51,7 @@ test.describe("cox can edit trips", () => {
|
||||
});
|
||||
|
||||
test("edit remarks", async () => {
|
||||
await sharedPage.goto("http://localhost:8000/planned");
|
||||
await sharedPage.goto("/planned");
|
||||
await sharedPage.getByRole("link", { name: "Details" }).click();
|
||||
await sharedPage.locator("#sidebar #notes").click();
|
||||
await sharedPage.locator("#sidebar #notes").fill("Meine Anmerkung");
|
||||
@ -67,7 +67,7 @@ test.describe("cox can edit trips", () => {
|
||||
});
|
||||
|
||||
test("add and remove guest", async () => {
|
||||
await sharedPage.goto("http://localhost:8000/planned");
|
||||
await sharedPage.goto("/planned");
|
||||
await sharedPage.getByRole("link", { name: "Details" }).click();
|
||||
await sharedPage.locator("#sidebar #user_note").click();
|
||||
await sharedPage.locator("#sidebar #user_note").fill("Mein Gast");
|
||||
@ -107,7 +107,7 @@ test.describe("cox can edit trips", () => {
|
||||
});
|
||||
|
||||
test("change amount rower", async () => {
|
||||
await sharedPage.goto("http://localhost:8000/planned");
|
||||
await sharedPage.goto("/planned");
|
||||
await sharedPage.getByRole("link", { name: "Details" }).click();
|
||||
await expect(sharedPage.locator("#sidebar")).toContainText(
|
||||
"Freie Plätze: 5",
|
||||
@ -121,7 +121,7 @@ test.describe("cox can edit trips", () => {
|
||||
});
|
||||
|
||||
test("call off trip", async () => {
|
||||
await sharedPage.goto("http://localhost:8000/planned");
|
||||
await sharedPage.goto("/planned");
|
||||
await sharedPage.getByRole("link", { name: "Details" }).click();
|
||||
await expect(sharedPage.locator("#sidebar")).toContainText(
|
||||
"Freie Plätze: 3",
|
||||
@ -136,7 +136,7 @@ test.describe("cox can edit trips", () => {
|
||||
});
|
||||
|
||||
test.afterAll(async () => {
|
||||
await sharedPage.goto("http://localhost:8000/planned");
|
||||
await sharedPage.goto("/planned");
|
||||
await sharedPage.getByRole("link", { name: "Details" }).click();
|
||||
await sharedPage.getByRole("link", { name: "Termin löschen" }).click();
|
||||
await sharedPage.close();
|
||||
|
Reference in New Issue
Block a user