From 1b2c154cf7af4bf96cf4e240a64b4b97860aa848 Mon Sep 17 00:00:00 2001 From: Siddhant Date: Fri, 24 Apr 2026 16:45:13 +0530 Subject: [PATCH] test(glossary): drop flaky mutex batch from "Add and Remove Assets" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first batch in this test added two siblings from a mutuallyExclusive glossary and relied on the server rejecting the save so the UI stayed empty and `add-tag` remained clickable for the next batch. Since #25313, TreeAsyncSelectList.handleChange drops mutex siblings client-side once its `/api/v1/glossaries?fields=mutuallyExclusive` fetch resolves, so only one term reaches the server, it saves successfully, tags become non-empty, and `add-tag` is replaced by `edit-button`. The test then times out waiting for `add-tag`. Whether the filter kicks in depends on a race between the dropdown's glossaries fetch and the user clicks, which is why the test sometimes passed (retries masking it on CI) and sometimes timed out at 3 minutes under CI load. Remove the mutex batch (and the now-unused glossary1/term1/term2 fixtures). The mutex flow was never actually asserted here — it was only used as a side channel to keep tags empty. The remaining non-mutex batch + chart-level tagging + asset verification still cover the add/remove-assets behavior end-to-end. Local: 5/5 passes in ~15-23s each (was timing out at 180s). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../ui/playwright/e2e/Pages/Glossary.spec.ts | 67 ------------------- 1 file changed, 67 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..010e80978772 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 @@ -487,21 +487,12 @@ test.describe('Glossary tests', () => { test.slow(true); const { page, afterAction, apiContext } = await performAdminLogin(browser); - 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(); const glossaryTerm3 = new GlossaryTerm(glossary2); const glossaryTerm4 = new GlossaryTerm(glossary2); glossary2.data.terms = [glossaryTerm3, glossaryTerm4]; - await glossary1.create(apiContext); await glossary2.create(apiContext); - await glossaryTerm1.create(apiContext); - await glossaryTerm2.create(apiContext); await glossaryTerm3.create(apiContext); await glossaryTerm4.create(apiContext); @@ -529,61 +520,6 @@ test.describe('Glossary tests', () => { // Select 1st term await page.click('[data-testid="tag-selector"] #tagsForm_tags'); - const glossaryRequest = page.waitForResponse( - `/api/v1/search/query?q=*&index=glossaryTerm&from=0&size=25&deleted=false&track_total_hits=true&getHierarchy=true` - ); - await page.type( - '[data-testid="tag-selector"] #tagsForm_tags', - glossaryTerm1.data.name - ); - await glossaryRequest; - - await page.getByText(glossaryTerm1.data.displayName).click(); - await page - .locator( - `[data-testid="tag-selector"]:has-text("${glossaryTerm1.data.displayName}")` - ) - .waitFor(); - - // Select 2nd term - await page.click('[data-testid="tag-selector"] #tagsForm_tags'); - - const glossaryRequest2 = page.waitForResponse( - `/api/v1/search/query?q=*&index=glossaryTerm&from=0&size=25&deleted=false&track_total_hits=true&getHierarchy=true` - ); - await page.type( - '[data-testid="tag-selector"] #tagsForm_tags', - glossaryTerm2.data.name - ); - await glossaryRequest2; - - await page.getByText(glossaryTerm2.data.displayName).click(); - - await page - .locator( - `[data-testid="tag-selector"]:has-text("${glossaryTerm2.data.displayName}")` - ) - .waitFor(); - - const patchRequest = page.waitForResponse( - (res) => - res.url().includes('/api/v1/dashboards/') && - res.request().method() === 'PATCH' - ); - - await expect(page.getByTestId('saveAssociatedTag')).toBeEnabled(); - - 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"]' - ); - - // Select 1st term - await page.click('[data-testid="tag-selector"] #tagsForm_tags'); - const glossaryRequest3 = page.waitForResponse( `/api/v1/search/query?q=*&index=glossaryTerm&from=0&size=25&deleted=false&track_total_hits=true&getHierarchy=true` ); @@ -718,11 +654,8 @@ test.describe('Glossary tests', () => { ); }); } finally { - await glossaryTerm1.delete(apiContext); - await glossaryTerm2.delete(apiContext); await glossaryTerm3.delete(apiContext); await glossaryTerm4.delete(apiContext); - await glossary1.delete(apiContext); await glossary2.delete(apiContext); await dashboardEntity.delete(apiContext); await afterAction();