Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/web/playwright/fixtures/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,10 @@ const createUserFixture = (user: UserWithIncludes, page: Page) => {
},
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");
Comment on lines +687 to +690
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one ensures that the session is correctly removed after logout. Previously it was causing flakes, as session were there

},
getFirstTeamMembership: async () => {
const memberships = await prisma.membership.findMany({
Expand Down
4 changes: 3 additions & 1 deletion apps/web/playwright/insights.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ test.describe("Insights", async () => {
];

for (const title of expectedChartTitles) {
const chartCard = page.locator("[data-testid='panel-card'] h2").filter({ hasText: title });
const chartCard = page
.locator("[data-testid='panel-card'] h2")
.filter({ hasText: new RegExp(`^${title}$`) });
await expect(chartCard).toBeVisible();
}
});
Expand Down
Loading