Skip to content

Commit 550f34c

Browse files
authored
fix: all e2e flakes [WIP] (calcom#23633)
* fix all e2e flakes * Update workflow.e2e.ts
1 parent d6b17b7 commit 550f34c

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

apps/web/playwright/change-theme.e2e.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test.describe("Change App Theme Test", () => {
77
const pro = await users.create();
88
await pro.apiLogin();
99
await page.goto("/settings/my-account/appearance");
10-
await expect(page.locator('text="Dashboard theme"')).toBeVisible();
10+
await expect(page.getByTestId("dashboard-shell").getByText("Dashboard theme")).toBeVisible();
1111
await page.click('[data-testid="appTheme-dark"]');
1212
await page.click('[data-testid="update-app-theme-btn"]');
1313

@@ -25,7 +25,7 @@ test.describe("Change App Theme Test", () => {
2525
const pro = await users.create();
2626
await pro.apiLogin();
2727
await page.goto("/settings/my-account/appearance");
28-
await expect(page.locator('text="Dashboard theme"')).toBeVisible();
28+
await expect(page.getByTestId("dashboard-shell").getByText("Dashboard theme")).toBeVisible();
2929
await page.click('[data-testid="appTheme-light"]');
3030
await page.click('[data-testid="update-app-theme-btn"]');
3131

@@ -44,7 +44,7 @@ test.describe("Change App Theme Test", () => {
4444
await pro.apiLogin();
4545

4646
await page.goto("/settings/my-account/appearance");
47-
await expect(page.locator('text="Dashboard theme"')).toBeVisible();
47+
await expect(page.getByTestId("dashboard-shell").getByText("Dashboard theme")).toBeVisible();
4848
await page.click('[data-testid="appTheme-light"]');
4949
await page.click('[data-testid="update-app-theme-btn"]');
5050
const toast1 = await page.waitForSelector('[data-testid="toast-success"]');
@@ -72,7 +72,7 @@ test.describe("Change Booking Page Theme Test", () => {
7272
await pro.apiLogin();
7373

7474
await page.goto("/settings/my-account/appearance");
75-
await expect(page.locator('text="Dashboard theme"')).toBeVisible();
75+
await expect(page.getByTestId("dashboard-shell").getByText("Dashboard theme")).toBeVisible();
7676

7777
//Click the "Dark" theme label
7878
await page.click('[data-testid="theme-dark"]');
@@ -94,7 +94,7 @@ test.describe("Change Booking Page Theme Test", () => {
9494
await pro.apiLogin();
9595

9696
await page.goto("/settings/my-account/appearance");
97-
await expect(page.locator('text="Dashboard theme"')).toBeVisible();
97+
await expect(page.getByTestId("dashboard-shell").getByText("Dashboard theme")).toBeVisible();
9898

9999
//Click the "Light" theme label
100100
await page.click('[data-testid="theme-light"]');
@@ -114,7 +114,7 @@ test.describe("Change Booking Page Theme Test", () => {
114114
await pro.apiLogin();
115115

116116
await page.goto("/settings/my-account/appearance");
117-
await expect(page.locator('text="Dashboard theme"')).toBeVisible();
117+
await expect(page.getByTestId("dashboard-shell").getByText("Dashboard theme")).toBeVisible();
118118

119119
await page.click('[data-testid="theme-light"]');
120120
await page.click('[data-testid="update-theme-btn"]');

apps/web/playwright/workflow.e2e.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ test.describe("Workflow Tab - Event Type", () => {
2626
await fillNameInput("Edited Workflow");
2727
await saveWorkflow();
2828
await page.getByTestId("go-back-button").click();
29-
page.getByTestId("workflow-list").waitFor();
29+
await page.getByTestId("workflow-list").waitFor();
30+
await page.reload();
3031
await hasWorkflowInList("Edited Workflow");
3132
});
3233

0 commit comments

Comments
 (0)