From c3977649411597de61fe2fde847d5bb26fb2584f Mon Sep 17 00:00:00 2001 From: Aniket Katkar Date: Mon, 17 Feb 2025 15:06:15 +0530 Subject: [PATCH 1/2] Fix the failing playwright tests on main --- .../resources/ui/playwright/e2e/Features/QueryEntity.spec.ts | 4 +++- .../main/resources/ui/playwright/e2e/Pages/TestSuite.spec.ts | 4 +++- .../src/main/resources/ui/playwright/utils/entity.ts | 2 +- .../src/main/resources/ui/playwright/utils/importUtils.ts | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/QueryEntity.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/QueryEntity.spec.ts index f2f653128712..b35180a99e1b 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/QueryEntity.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/QueryEntity.spec.ts @@ -106,7 +106,9 @@ test('Query Entity', async ({ page }) => { }); await test.step('Update owner, description and tag', async () => { - const ownerListResponse = page.waitForResponse('/api/v1/users?*'); + const ownerListResponse = page.waitForResponse( + '/api/v1/search/query?q=*isBot:false*index=user_search_index*' + ); await page .getByTestId( 'entity-summary-resizable-right-panel-container entity-resizable-panel-container' diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestSuite.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestSuite.spec.ts index c70470a2c921..cd4adcc1cb58 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestSuite.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestSuite.spec.ts @@ -217,7 +217,9 @@ test('Logical TestSuite', async ({ page }) => { await page.waitForSelector("[data-testid='select-owner-tabs']", { state: 'visible', }); - const getOwnerList = page.waitForResponse('/api/v1/users?*isBot=false*'); + const getOwnerList = page.waitForResponse( + '/api/v1/search/query?q=*isBot:false*index=user_search_index*' + ); await page.click('.ant-tabs [id*=tab-users]'); await getOwnerList; await page.waitForSelector(`[data-testid="loader"]`, { diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts index 514c4ce500be..13f01b667836 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts @@ -64,7 +64,7 @@ export const addOwner = async ({ await page.getByTestId(initiatorId).click(); if (type === 'Users') { const userListResponse = page.waitForResponse( - '/api/v1/users?limit=*&isBot=false*' + '/api/v1/search/query?q=*isBot:false*index=user_search_index*' ); await page.getByRole('tab', { name: type }).click(); await userListResponse; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/importUtils.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/importUtils.ts index 3096c2062347..58a58d9e9608 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/importUtils.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/importUtils.ts @@ -63,7 +63,7 @@ export const fillOwnerDetails = async (page: Page, owners: string[]) => { .press('Enter', { delay: 100 }); const userListResponse = page.waitForResponse( - '/api/v1/users?limit=*&isBot=false*' + '/api/v1/search/query?q=*isBot:false*index=user_search_index*' ); await page.getByRole('tab', { name: 'Users' }).click(); await userListResponse; From e92ffe0d243a17d77eaaa08ff8168ba5fcc67fab Mon Sep 17 00:00:00 2001 From: Aniket Katkar Date: Tue, 18 Feb 2025 11:20:34 +0530 Subject: [PATCH 2/2] Fix the GlossaryBulkImportExport test --- .../src/main/resources/ui/playwright/utils/importUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/importUtils.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/importUtils.ts index 58a58d9e9608..e5906f554469 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/importUtils.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/importUtils.ts @@ -75,7 +75,7 @@ export const fillOwnerDetails = async (page: Page, owners: string[]) => { await page.locator('[data-testid="owner-select-users-search-bar"]').clear(); await page.keyboard.type(owner); await page.waitForResponse( - `/api/v1/search/query?q=*${owner}*%20AND%20isBot:false&from=0&size=25&index=user_search_index` + `/api/v1/search/query?q=*${owner}*%20AND%20isBot:false*index=user_search_index*` ); await page.getByRole('listitem', { name: owner }).click();