Skip to content

Scheduling infrastructure for absolutely everyone.

fix: wait for team visibility before navigating in team-management e2e (#28891)

Pedro Castro7b6572b9655b
diff --git a/apps/web/playwright/organization/team-management.e2e.ts b/apps/web/playwright/organization/team-management.e2e.ts
index 0ebca8d8f5f..50055010fe5 100644
--- a/apps/web/playwright/organization/team-management.e2e.ts
+++ b/apps/web/playwright/organization/team-management.e2e.ts
@@ -53,8 +53,10 @@ test.describe("Teams", () => {
});
await test.step("Can navigate to team settings", async () => {
- // Click on the team to go to settings
- await page.locator(`text=${user.username}'s Team`).click();
+ // Wait for the team name to be visible before clicking
+ const teamLocator = page.locator(`text=${user.username}'s Team`);
+ await expect(teamLocator).toBeVisible({ timeout: 15000 });
+ await teamLocator.click();
await page.waitForURL(/\/settings\/teams\/(\d+)\/profile$/i);
});