From 2e45d738928f51b05a436ff9baf0b42abc94b94b Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 8 May 2026 10:35:29 -0400 Subject: [PATCH] fix(e2e): stop double-toast race in team-name change test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "should change team name" Playwright test renames the team and then restores the original name in the same run. Both mutations fire the "Updated team name" Mantine toast, which has no autoClose override and uses the ~4s default. The second assertion was a duplicate getByText on the same toast text, so when both notifications coexisted in the DOM it tripped strict mode and failed across all retries. Replace the redundant toast assertion with a check that the displayed team name has been restored — same code path (setIsEditingTeamName(false) runs in the same onSuccess as the toast), no race, stronger end-state signal. --- packages/app/tests/e2e/features/team.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/tests/e2e/features/team.spec.ts b/packages/app/tests/e2e/features/team.spec.ts index 40ea76d4c4..4c16855a64 100644 --- a/packages/app/tests/e2e/features/team.spec.ts +++ b/packages/app/tests/e2e/features/team.spec.ts @@ -112,7 +112,7 @@ test.describe('Team Settings Page', { tag: ['@team', '@full-stack'] }, () => { await test.step('Restore original team name', async () => { await teamPage.changeTeamName(originalName!); - await expect(teamPage.page.getByText('Updated team name')).toBeVisible(); + await expect(teamPage.teamNameValue).toHaveText(originalName!); }); });