test(glossary): fix flaky "Add and Remove Assets" by using edit-button#27708
test(glossary): fix flaky "Add and Remove Assets" by using edit-button#27708
Conversation
Since #25313, TreeAsyncSelectList.handleChange drops mutex siblings client-side so one tag reaches the server and the save succeeds. That flips tags on the entity from empty to non-empty, which replaces the `add-tag` button with `edit-button` in TagsContainerV2. The second add-tag click in this test (and the `icons.count === 2` expectation) relied on the pre-#25313 behavior where the PATCH was rejected and the entity stayed tagless — under the new UX that assumption no longer holds, so the test timed out at 180s waiting for `add-tag`. - Drop `mutuallyExclusive = true` on glossary1 (mutex behavior is covered elsewhere; it wasn't asserted here). - Re-open the tag selector via `edit-button` for the second batch. - Update the final icon count from 2 to 4 (two terms from each of the two glossaries now survive the save). Local: 10/10 passes at ~15-20s each. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ ApprovedReplaces direct interaction with an edit-button for the "Add and Remove Assets" test to eliminate flakiness. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
There was a problem hiding this comment.
Pull request overview
This PR fixes a flaky Playwright E2E test (Add and Remove Assets) by avoiding reliance on add-tag remaining visible after the first successful tag save, and instead re-opening the tag selector via edit-button.
Changes:
- Removed
mutuallyExclusive = truesetup from the first glossary used in the test to avoid client-side mutex behavior affecting the flow. - Updated the second tag-add flow to click
edit-button(since tags now exist after the first save). - Updated the expected glossary icon count to reflect tags from both batches.
|
🔴 Playwright Results — 3 failure(s), 16 flaky✅ 3953 passed · ❌ 3 failed · 🟡 16 flaky · ⏭️ 86 skipped
Genuine Failures (failed on all attempts)❌
|



Summary
Pages/Glossary.spec.ts › Add and Remove Assets(shard 6 on CI) timed out at 180s on the secondadd-tagclick. Root cause is that #25313 (client-side mutex radios inTreeAsyncSelectList) drops a mutex sibling before the PATCH, so the save succeeds with one tag instead of being server-rejected. That flips the entity'stagsfrom empty to non-empty, andTagsContainerV2swapsadd-tagforedit-buttonwhenever tags exist — the test had been implicitly relying on the pre-#25313 rejection to keepadd-tagrendered.Change
mutuallyExclusive = trueonglossary1(mutex behavior is covered elsewhere; it wasn't asserted by this test — it was only a side-channel to keeptagsempty).edit-button.icons.countfrom 2 to 4 — both terms from each of the two glossaries now land on the entity, andglossary-iconis rendered per tag (see TagsV1.component.tsx:83).Verification
main: 2/2 timeouts.Supersedes #27707 (which removed the batch entirely — this version keeps the multi-glossary tagging coverage).
Test plan
yarn playwright test --project=chromium -g "Add and Remove Assets" --repeat-each=5(x2 rounds) — Glossary iterations all pass.🤖 Generated with Claude Code