playwright: remove duplicate team deletion test from TeamsDragAndDrop#27668
playwright: remove duplicate team deletion test from TeamsDragAndDrop#27668harsh-vador merged 2 commits intomainfrom
Conversation
| test.afterAll('Cleanup', async ({ browser }) => { | ||
| const { afterAction } = await createNewPage(browser); | ||
| await afterAction(); | ||
| }); |
There was a problem hiding this comment.
🚨 Bug: afterAll cleanup does not delete any teams
The old Delete Teams test explicitly called hardDeleteTeam for each of the four created teams (teamNameBusiness, teamNameDivision, teamNameDepartment, teamNameGroup). The replacement afterAll block only calls createNewPage and afterAction(), which simply disposes the API context and closes the page — it performs no team deletion at all.
This means every run of this spec will leak four teams in the environment, which can cause name collisions on repeated runs (since team names include a uuid(), this won't fail immediately, but it pollutes the instance) and contradicts the PR description's claim of "hard-delete the teams created by this spec."
The afterAll should use the apiContext from createNewPage to issue hard-delete API calls for all four teams before calling afterAction().
Suggested fix:
test.afterAll('Cleanup', async ({ browser }) => {
const { apiContext, afterAction } = await createNewPage(browser);
for (const teamName of [
teamNameBusiness,
teamNameDivision,
teamNameDepartment,
teamNameGroup,
]) {
await apiContext.delete(
`/api/v1/teams/name/${teamName}?hardDelete=true&recursive=true`
);
}
await afterAction();
});
Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion
Code Review 🚫 Blocked 0 resolved / 1 findingsRemoves duplicate team deletion test, but the 🚨 Bug: afterAll cleanup does not delete any teams📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsDragAndDrop.spec.ts:93-96 The old This means every run of this spec will leak four teams in the environment, which can cause name collisions on repeated runs (since team names include a The Suggested fix🤖 Prompt for agentsOptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
🟡 Playwright Results — all passed (19 flaky)✅ 3692 passed · ❌ 0 failed · 🟡 19 flaky · ⏭️ 89 skipped
🟡 19 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
|
Changes have been cherry-picked to the 1.12.7 branch. |
…open-metadata#27668) * playwright: remove duplicate team deletion test from TeamsDragAndDrop * remove unwanted



Describe your changes:
PR description
TeamsDragAndDrop.spec.tssinceTeams.spec.tsalready covers team deletion.Screen.Recording.2026-04-23.at.5.29.01.PM.mov
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>