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

This commit is contained in:
Pedro Castro
2026-04-14 18:12:40 +00:00
committed by GitHub
parent 21eb77012d
commit 7b6572b965
@@ -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);
});