Skip to content

Commit cc7612b

Browse files
harsh-vadorclaude
andcommitted
test(teams): stop the add-team click from landing in a toast
addTeamHierarchy clicked the add button with `force: true`, which skips the hit-target check. The backend fans delete/job notifications out to every socket of the logged-in admin, so a parallel worker's success toast can sit over that button — and with force the click was dispatched into the toast. The click "succeeded", the modal never opened, and the failure surfaced 15s later on the modal assertion. Success toasts carry no close button and self-dismiss after 3.5s, so clicking without force is the fix: the hit-target check waits the toast out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent e5f28d1 commit cc7612b

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

  • openmetadata-ui/src/main/resources/ui/playwright/utils

openmetadata-ui/src/main/resources/ui/playwright/utils/team.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,16 @@ export const addTeamHierarchy = async (
254254
) => {
255255
const addTeamModal = page.locator('[role="dialog"].ant-modal').last();
256256

257-
// Fetching the add button and clicking on it
258-
if (index && index > 0) {
259-
await page.click('[data-testid="add-placeholder-button"]', { force: true });
260-
} else {
261-
await page.click('[data-testid="add-team"]', { force: true });
262-
}
257+
// The backend fans delete/job notifications out to every socket of the logged-in
258+
// user, so a parallel worker's toast can land over this button. Success toasts
259+
// carry no close button and self-dismiss after 3.5s, so the fix is to click
260+
// WITHOUT `force`: the hit-target check then waits the toast out. With `force`
261+
// the click was dispatched into the toast and the modal never opened.
262+
const addButton = page.getByTestId(
263+
index && index > 0 ? 'add-placeholder-button' : 'add-team'
264+
);
265+
await expect(addButton).toBeEnabled();
266+
await addButton.click();
263267

264268
await expect(addTeamModal).toBeVisible();
265269
await expect(page.locator('[data-testid="name"]')).toBeVisible();

0 commit comments

Comments
 (0)