Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playwright: Fix the failing playwright tests on main #19832

Merged
merged 5 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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"]`, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
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
Loading