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 7ca34d433f3..a8d87fcc35b 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 @@ -66,7 +66,7 @@ test('Query Entity', async ({ page }) => { ); await page.click(`[data-testid="table_queries"]`); const tableResponse = page.waitForResponse( - '/api/v1/search/query?q=**&from=0&size=*&index=table_search_index*' + '/api/v1/search/query?q=&index=table_search_index&from=0&size=*' ); await queryResponse; await page.click(`[data-testid="add-query-btn"]`); @@ -110,7 +110,7 @@ test('Query Entity', async ({ page }) => { await test.step('Update owner, description and tag', async () => { const ownerListResponse = page.waitForResponse( - '/api/v1/search/query?q=*isBot:false*index=user_search_index*' + '/api/v1/search/query?q=&index=user_search_index&*' ); await page .getByTestId( @@ -180,7 +180,7 @@ test('Query Entity', async ({ page }) => { await page.keyboard.type(`${queryData.queryUsedIn.table1}`); await page.click('[data-testid="edit-query-used-in"]'); const tableSearchResponse = page.waitForResponse( - '/api/v1/search/query?q=*&index=table_search_index*' + '/api/v1/search/query?q=&index=table_search_index*' ); await page.keyboard.type(queryData.queryUsedIn.table2); await tableSearchResponse; 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 c8d1f19f587..a87c7b76b50 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts @@ -119,7 +119,7 @@ export const addOwner = async ({ await page.getByTestId(initiatorId).click(); if (type === 'Users') { const userListResponse = page.waitForResponse( - '/api/v1/search/query?q=*isBot:false*index=user_search_index*' + '/api/v1/search/query?q=&index=user_search_index&*' ); await page.getByRole('tab', { name: type }).click(); await userListResponse; @@ -178,7 +178,7 @@ export const addOwnerWithoutValidation = async ({ await page.getByTestId(initiatorId).click(); if (type === 'Users') { const userListResponse = page.waitForResponse( - '/api/v1/search/query?q=*isBot:false*index=user_search_index*' + '/api/v1/search/query?q=&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 ce648a04f93..a4ba16437de 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/importUtils.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/importUtils.ts @@ -94,7 +94,7 @@ export const fillOwnerDetails = async (page: Page, owners: string[]) => { await page.waitForSelector('[data-testid="loader"]', { state: 'detached' }); const userListResponse = page.waitForResponse( - '/api/v1/search/query?q=*isBot:false*index=user_search_index*' + '/api/v1/search/query?q=&index=user_search_index&*' ); await page.getByRole('tab', { name: 'Users' }).click(); await userListResponse; @@ -390,16 +390,16 @@ export const fillGlossaryRowDetails = async ( .locator(RDG_ACTIVE_CELL_SELECTOR) .press('ArrowRight', { delay: 100 }); - await fillTextInputDetails(page, "#ccc") + await fillTextInputDetails(page, '#ccc'); await page .locator(RDG_ACTIVE_CELL_SELECTOR) .press('ArrowRight', { delay: 100 }); const base64Src = - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=='; + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=='; - await fillTextInputDetails(page, base64Src) + await fillTextInputDetails(page, base64Src); await page .locator(RDG_ACTIVE_CELL_SELECTOR) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/service.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/service.ts index eede70301e0..989278b8d36 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/service.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/service.ts @@ -11,18 +11,17 @@ * limitations under the License. */ import { expect, Page } from '@playwright/test'; -import { escapeESReservedCharacters, getEncodedFqn } from './entity'; import { settingClick, SettingOptionsType } from './sidebar'; export const searchServiceFromSettingPage = async ( page: Page, service: string ) => { - const serviceResponse = page.waitForResponse( - `/api/v1/search/query?q=**${getEncodedFqn( - escapeESReservedCharacters(service) - )}**` - ); + const serviceResponse = page.waitForResponse((response) => { + const url = response.url(); + + return url.includes('/api/v1/search/query') && url.includes(service); + }); await page.fill('[data-testid="searchbar"]', service); await serviceResponse; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts index 73327438082..d72e44d7f17 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts @@ -96,7 +96,7 @@ export const visitUserProfilePage = async (page: Page, userName: string) => { } ); const userResponse = page.waitForResponse( - '/api/v1/search/query?q=**AND%20isAdmin:false%20isBot:false&from=0&size=*&index=*' + '/api/v1/search/query?q=*&index=*&from=0&size=*' ); const loader = page.waitForSelector( '[data-testid="user-list-v1-component"] [data-testid="loader"]', @@ -116,7 +116,7 @@ export const softDeleteUserProfilePage = async ( displayName: string ) => { const userResponse = page.waitForResponse( - '/api/v1/search/query?q=**&from=0&size=*&index=*' + '/api/v1/search/query?q=*&index=*&from=0&size=*' ); await page.getByTestId('searchbar').fill(userName); await userResponse;