From d71843f1332f92956ae5bc96dfbe5e660304fbb3 Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Thu, 11 Sep 2025 02:24:56 +0530 Subject: [PATCH] PLAYWRIGHT : fix the DataContract and IngestionBot playwright flaky test (#23321) * fix the DataContract playwright flaky test * fix the ingestionBot flayness --- .../ui/playwright/e2e/Flow/IngestionBot.spec.ts | 2 ++ .../ui/playwright/e2e/Pages/DataContracts.spec.ts | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/IngestionBot.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/IngestionBot.spec.ts index 92eb96b90a8..c05615cf8e9 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/IngestionBot.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/IngestionBot.spec.ts @@ -158,6 +158,7 @@ test.describe('Ingestion Bot ', () => { // Add assets to domain 1 await redirectToHomePage(page); await sidebarClick(page, SidebarItem.DOMAIN); + await page.waitForLoadState('networkidle'); await selectDomain(page, domain1.data); await addServicesToDomain(page, domain1.data, [ domainAsset1[0].get().service, @@ -166,6 +167,7 @@ test.describe('Ingestion Bot ', () => { // Add assets to domain 2 await redirectToHomePage(page); await sidebarClick(page, SidebarItem.DOMAIN); + await page.waitForLoadState('networkidle'); await selectDomain(page, domain2.data); await addServicesToDomain(page, domain2.data, [ domainAsset2[0].get().service, 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 8e1ef2a18c1..184ac57e3c6 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 @@ -10,7 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { test as base, expect, Page } from '@playwright/test'; +import { expect, Page, test as base } from '@playwright/test'; import { DATA_CONTRACT_CONTAIN_SEMANTICS, DATA_CONTRACT_DETAILS, @@ -481,8 +481,17 @@ test.describe('Data Contracts', () => { await page.getByTestId('contract-edit-button').click(); + const qualityResponse = page.waitForResponse( + '/api/v1/dataQuality/testCases/search/list**' + ); + await page.getByRole('tab', { name: 'Quality' }).click(); + await qualityResponse; + await page.waitForSelector('[data-testid="loader"]', { + state: 'detached', + }); + await page .locator('input[type="checkbox"][aria-label="Select all"]') .uncheck();