Skip to content

Commit

Permalink
Playwright: Fix the failing playwright tests on main (#19832)
Browse files Browse the repository at this point in the history
* Fix the failing playwright tests on main

* Fix the GlossaryBulkImportExport test

(cherry picked from commit 982b530)
  • Loading branch information
aniketkatkar97 authored and OpenMetadata Release Bot committed Feb 18, 2025
1 parent ceff31b commit ae35f19
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]`, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down

0 comments on commit ae35f19

Please sign in to comment.