From efbc75561916908d5b68f1d80e99b3d00f53c124 Mon Sep 17 00:00:00 2001 From: Shrabanti Paul Date: Wed, 15 Apr 2026 12:39:35 +0530 Subject: [PATCH 1/6] increase data contracts test timeout --- .../resources/ui/playwright/e2e/Pages/DataContracts.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataContracts.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataContracts.spec.ts index b960c8a4ade5..b3329deaf143 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataContracts.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataContracts.spec.ts @@ -142,7 +142,8 @@ test.describe('Data Contracts', () => { test(`Create Data Contract and validate for ${entityType}`, async ({ page, }) => { - test.slow(true); + // 12-min timeout so waitForDataContractExecution completes first. + test.setTimeout(720_000); const testClassification = new ClassificationClass(); const testTag = new TagClass({ From e192b050a06579e323a82f2727e87d99cd012e01 Mon Sep 17 00:00:00 2001 From: Shrabanti Paul Date: Thu, 16 Apr 2026 10:57:48 +0530 Subject: [PATCH 2/6] fix failure in restroreEntityInheritedFields --- .../RestoreEntityInheritedFields.spec.ts | 11 ++- .../resources/ui/playwright/utils/common.ts | 77 +++++++++++++++---- 2 files changed, 72 insertions(+), 16 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/RestoreEntityInheritedFields.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/RestoreEntityInheritedFields.spec.ts index f3f701550915..d2632b4224e1 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/RestoreEntityInheritedFields.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/RestoreEntityInheritedFields.spec.ts @@ -105,9 +105,14 @@ entities.forEach((EntityClass) => { await entity.visitEntityPage(page); - await assignDataProduct(page, domain.responseData, [ - dataProduct.responseData, - ]); + await assignDataProduct( + page, + domain.responseData, + [dataProduct.responseData], + 'Add', + 'KnowledgePanel.DataProducts', + true + ); // This will delete and restore and ensure both operation are successful await softDeleteEntity( diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts index 63a55ef0db80..bd58c04251d9 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts @@ -430,13 +430,39 @@ export const assignDataProduct = async ( fullyQualifiedName?: string; }[], action: 'Add' | 'Edit' = 'Add', - parentId = 'KnowledgePanel.DataProducts' + parentId = 'KnowledgePanel.DataProducts', + // Set true when the domain is inherited from a parent entity. The search + // index is updated asynchronously, so a page reload is needed on each poll + // to fetch the current state directly from the entity API. + pollForInheritance = false ) => { - const hasMultipleDomains = await page - .getByTestId('domain-count-button') - .isVisible(); - if (hasMultipleDomains) { - await expect(page.getByTestId('domain-count-button')).toBeVisible(); + if (pollForInheritance) { + await expect + .poll( + async () => { + await page.reload(); + await waitForAllLoadersToDisappear(page); + + const hasMultipleDomains = await page + .getByTestId('domain-count-button') + .isVisible(); + + if (hasMultipleDomains) { + return page.getByTestId('domain-count-button').isVisible(); + } + + return page + .getByTestId('domain-link') + .textContent() + .catch(() => null); + }, + { + message: `Waiting for inherited domain "${domain.displayName}" to appear on the entity page`, + timeout: 30_000, + intervals: [2_000, 3_000, 5_000], + } + ) + .toContain(domain.displayName); } else { await expect(page.getByTestId('domain-link')).toContainText( domain.displayName @@ -487,13 +513,38 @@ export const assignDataProduct = async ( .click(); await patchReq; - for (const dataProduct of dataProducts) { - await expect( - page - .getByTestId(parentId) - .getByTestId('data-products-list') - .getByTestId(`data-product-${dataProduct.fullyQualifiedName}`) - ).toBeVisible(); + if (pollForInheritance) { + for (const dataProduct of dataProducts) { + await expect + .poll( + async () => { + await page.reload(); + await waitForAllLoadersToDisappear(page); + + return page + .getByTestId(parentId) + .getByTestId('data-products-list') + .getByTestId(`data-product-${dataProduct.fullyQualifiedName}`) + .isVisible() + .catch(() => false); + }, + { + message: `Waiting for data product "${dataProduct.displayName}" to appear after save`, + timeout: 30_000, + intervals: [2_000, 3_000, 5_000], + } + ) + .toBe(true); + } + } else { + for (const dataProduct of dataProducts) { + await expect( + page + .getByTestId(parentId) + .getByTestId('data-products-list') + .getByTestId(`data-product-${dataProduct.fullyQualifiedName}`) + ).toBeVisible(); + } } }; From b27f0bdc1e25e8da8bca07266b2db931131635cb Mon Sep 17 00:00:00 2001 From: Shrabanti Paul Date: Thu, 16 Apr 2026 11:30:20 +0530 Subject: [PATCH 3/6] fix restrore entity inheritance specs --- .../resources/ui/playwright/utils/common.ts | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts index bd58c04251d9..8af5946e0492 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts @@ -436,6 +436,24 @@ export const assignDataProduct = async ( // to fetch the current state directly from the entity API. pollForInheritance = false ) => { + // Returns the domain display text. When multiple domains are present the + // count-button is shown instead of domain-link; returning displayName directly + // satisfies the .toContain assertion in both the poll and non-poll paths. + const getDomainText = async () => { + const hasMultipleDomains = await page + .getByTestId('domain-count-button') + .isVisible(); + + if (hasMultipleDomains) { + await expect(page.getByTestId('domain-count-button')).toBeVisible(); + } + + return page + .getByTestId('domain-link') + .textContent() + .catch(() => null); + }; + if (pollForInheritance) { await expect .poll( @@ -443,18 +461,7 @@ export const assignDataProduct = async ( await page.reload(); await waitForAllLoadersToDisappear(page); - const hasMultipleDomains = await page - .getByTestId('domain-count-button') - .isVisible(); - - if (hasMultipleDomains) { - return page.getByTestId('domain-count-button').isVisible(); - } - - return page - .getByTestId('domain-link') - .textContent() - .catch(() => null); + return getDomainText(); }, { message: `Waiting for inherited domain "${domain.displayName}" to appear on the entity page`, @@ -464,9 +471,9 @@ export const assignDataProduct = async ( ) .toContain(domain.displayName); } else { - await expect(page.getByTestId('domain-link')).toContainText( - domain.displayName - ); + const domainText = await getDomainText(); + + expect(domainText).toContain(domain.displayName); } await page From 6547e035047f739ed33b291bfabdc027f1b5cb05 Mon Sep 17 00:00:00 2001 From: Shrabanti Paul Date: Thu, 16 Apr 2026 13:35:37 +0530 Subject: [PATCH 4/6] remove unnecessary multiple domains check --- .../resources/ui/playwright/utils/common.ts | 33 +++++-------------- 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts index 8af5946e0492..70a648aa15f4 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts @@ -436,24 +436,6 @@ export const assignDataProduct = async ( // to fetch the current state directly from the entity API. pollForInheritance = false ) => { - // Returns the domain display text. When multiple domains are present the - // count-button is shown instead of domain-link; returning displayName directly - // satisfies the .toContain assertion in both the poll and non-poll paths. - const getDomainText = async () => { - const hasMultipleDomains = await page - .getByTestId('domain-count-button') - .isVisible(); - - if (hasMultipleDomains) { - await expect(page.getByTestId('domain-count-button')).toBeVisible(); - } - - return page - .getByTestId('domain-link') - .textContent() - .catch(() => null); - }; - if (pollForInheritance) { await expect .poll( @@ -461,19 +443,22 @@ export const assignDataProduct = async ( await page.reload(); await waitForAllLoadersToDisappear(page); - return getDomainText(); + return page + .getByTestId('domain-link') + .textContent() + .catch(() => null); }, { message: `Waiting for inherited domain "${domain.displayName}" to appear on the entity page`, - timeout: 30_000, + timeout: 60_000, intervals: [2_000, 3_000, 5_000], } ) .toContain(domain.displayName); } else { - const domainText = await getDomainText(); - - expect(domainText).toContain(domain.displayName); + await expect(page.getByTestId('domain-link')).toContainText( + domain.displayName + ); } await page @@ -537,7 +522,7 @@ export const assignDataProduct = async ( }, { message: `Waiting for data product "${dataProduct.displayName}" to appear after save`, - timeout: 30_000, + timeout: 60_000, intervals: [2_000, 3_000, 5_000], } ) From d27cabda454063285e59aa6b4af10ce07fb3fdd3 Mon Sep 17 00:00:00 2001 From: Shrabanti Paul Date: Thu, 16 Apr 2026 17:13:36 +0530 Subject: [PATCH 5/6] fix flaky restore entity inherited fields specs --- .../src/main/resources/ui/playwright/utils/common.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts index 70a648aa15f4..ee38c8125982 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts @@ -495,15 +495,18 @@ export const assignDataProduct = async ( .getByTestId('saveAssociatedTag') ).toBeEnabled(); - const patchReq = page.waitForResponse( - (req) => req.request().method() === 'PATCH' + const saveRequestPromise = page.waitForRequest( + (req) => + req.method() === 'PATCH' && req.url().includes('/api/v1/') ); await page .getByTestId('data-product-dropdown-actions') .getByTestId('saveAssociatedTag') .click(); - await patchReq; + + const saveRequest = await saveRequestPromise; + await saveRequest.response(); if (pollForInheritance) { for (const dataProduct of dataProducts) { From d44ad1665018b8d82144bf16e84f2d410cb0bed4 Mon Sep 17 00:00:00 2001 From: Shrabanti Paul Date: Thu, 16 Apr 2026 18:27:59 +0530 Subject: [PATCH 6/6] fix flaky restore entity inherited fields specs --- .../src/main/resources/ui/playwright/utils/common.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts index ee38c8125982..fe144ed5fd28 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts @@ -496,8 +496,7 @@ export const assignDataProduct = async ( ).toBeEnabled(); const saveRequestPromise = page.waitForRequest( - (req) => - req.method() === 'PATCH' && req.url().includes('/api/v1/') + (req) => req.method() === 'PATCH' && req.url().includes('/api/v1/') ); await page