Skip to content

Commit cf89046

Browse files
authored
fix: few more e2e flakes (calcom#23966)
1 parent d5d44fb commit cf89046

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

apps/web/playwright/fixtures/users.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,10 @@ const createUserFixture = (user: UserWithIncludes, page: Page) => {
684684
},
685685
logout: async () => {
686686
await page.goto("/auth/logout");
687+
const logoutBtn = page.getByTestId("logout-btn");
688+
await expect(logoutBtn).toHaveText("Go back to the login page");
689+
await page.reload();
690+
await expect(logoutBtn).toHaveText("Go back to the login page");
687691
},
688692
getFirstTeamMembership: async () => {
689693
const memberships = await prisma.membership.findMany({

apps/web/playwright/insights.e2e.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ test.describe("Insights", async () => {
271271
];
272272

273273
for (const title of expectedChartTitles) {
274-
const chartCard = page.locator("[data-testid='panel-card'] h2").filter({ hasText: title });
274+
const chartCard = page
275+
.locator("[data-testid='panel-card'] h2")
276+
.filter({ hasText: new RegExp(`^${title}$`) });
275277
await expect(chartCard).toBeVisible();
276278
}
277279
});

0 commit comments

Comments
 (0)