Skip to content

Scheduling infrastructure for absolutely everyone.

fix: one e2e flake visible in ci (#23897)

Anik Dhabal Babu3b471f0e259a
diff --git a/apps/web/playwright/fixtures/apps.ts b/apps/web/playwright/fixtures/apps.ts
index 3d213d4e795..b511b041a8e 100644
--- a/apps/web/playwright/fixtures/apps.ts
+++ b/apps/web/playwright/fixtures/apps.ts
@@ -111,6 +111,9 @@ export function createAppsFixture(page: Page) {
},
goToEventType: async (eventType: string) => {
await page.getByRole("link", { name: eventType }).click();
+ // fix the race condition
+ await page.waitForSelector('[data-testid="event-title"]');
+ await expect(page.getByTestId("vertical-tab-basics")).toHaveAttribute("aria-current", "page");
},
goToAppsTab: async () => {
await page.getByTestId("vertical-tab-apps").click();
diff --git a/apps/web/playwright/fixtures/users.ts b/apps/web/playwright/fixtures/users.ts
index 4642bb1d56d..cd5370e4225 100644
--- a/apps/web/playwright/fixtures/users.ts
+++ b/apps/web/playwright/fixtures/users.ts
@@ -584,6 +584,10 @@ export const createUsersFixture = (
get: () => store.users,
logout: async () => {
await page.goto("/auth/logout");
+ const logoutBtn = page.getByTestId("logout-btn");
+ await expect(logoutBtn).toHaveText("Go back to the login page");
+ await page.reload();
+ await expect(logoutBtn).toHaveText("Go back to the login page");
},
deleteAll: async () => {
const ids = store.users.map((u) => u.id);
diff --git a/apps/web/playwright/workflow.e2e.ts b/apps/web/playwright/workflow.e2e.ts
index f262c5e8c21..290ce20c99a 100644
--- a/apps/web/playwright/workflow.e2e.ts
+++ b/apps/web/playwright/workflow.e2e.ts
@@ -15,7 +15,7 @@ test.describe("Workflow Tab - Event Type", () => {
test("Creating a new workflow", async ({ workflowPage }) => {
const { createWorkflow, assertListCount } = workflowPage;
- await createWorkflow({ name: "" });
+ await createWorkflow({ name: "test workflow" });
await assertListCount(3);
});