Playwright: Fix the failing playwright tests on main (#19832)

* Fix the failing playwright tests on main

* Fix the GlossaryBulkImportExport test

(cherry picked from commit 982b530ee5e8a099a6123c29033daef00f631648)
This commit is contained in:
Aniket Katkar 2025-02-18 14:31:24 +05:30 committed by OpenMetadata Release Bot
parent ceff31ba10
commit ae35f19c5e
4 changed files with 9 additions and 5 deletions

View File

@ -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'

View File

@ -201,7 +201,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"]`, {

View File

@ -59,7 +59,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;

View File

@ -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;
@ -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();