From e42770dbe752bb44b1be7961d35b905761b623f7 Mon Sep 17 00:00:00 2001 From: Siddhant Date: Fri, 24 Apr 2026 17:03:15 +0530 Subject: [PATCH] test(glossary): fix flaky "Add and Remove Assets" by using edit-button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts index 8bc26779008b..6d0c637c7c04 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts @@ -490,7 +490,6 @@ test.describe('Glossary tests', () => { const glossary1 = new Glossary(); const glossaryTerm1 = new GlossaryTerm(glossary1); const glossaryTerm2 = new GlossaryTerm(glossary1); - glossary1.data.mutuallyExclusive = true; glossary1.data.terms = [glossaryTerm1, glossaryTerm2]; const glossary2 = new Glossary(); @@ -576,9 +575,8 @@ test.describe('Glossary tests', () => { await page.getByTestId('saveAssociatedTag').click(); await patchRequest; - // Add non mutually exclusive tags await page.click( - '[data-testid="KnowledgePanel.GlossaryTerms"] [data-testid="glossary-container"] [data-testid="add-tag"]' + '[data-testid="KnowledgePanel.GlossaryTerms"] [data-testid="glossary-container"] [data-testid="edit-button"]' ); // Select 1st term @@ -648,7 +646,7 @@ test.describe('Glossary tests', () => { '[data-testid="KnowledgePanel.GlossaryTerms"] [data-testid="glossary-container"] [data-testid="glossary-icon"]' ); - expect(await icons.count()).toBe(2); + expect(await icons.count()).toBe(4); // Add Glossary to Dashboard Charts await page.click(