Skip to content

Commit 93ac30b

Browse files
shrabantipaul-collateShrabanti Paul
authored andcommitted
AUT failure on DataContracts spec (#27159)
* race condition on fast networks * fix flaky data contracts tests * fix flaky data contracts tests * Fix formatting and indentation in entity.ts * fix flaky data contracts tests --------- Co-authored-by: Shrabanti Paul <shrabantipaul@Shrabantis-MacBook-Pro.local> (cherry picked from commit 9b3f0b1)
1 parent b63003b commit 93ac30b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

  • openmetadata-ui/src/main/resources/ui/playwright/utils

openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,20 @@ export const addOwnerWithoutValidation = async ({
171171
(await usersTab.getAttribute('aria-selected')) === 'true';
172172

173173
if (!isTabAlreadySelected) {
174+
// The call with size > 0 only fires after the tab click.
174175
const userListResponse = page.waitForResponse(
175-
'/api/v1/search/query?q=&index=user_search_index&*'
176+
(response) =>
177+
response.url().includes('/api/v1/search/query?q=&index=user') &&
178+
!response.url().includes('size=0') &&
179+
response.status() === 200
176180
);
177181
await usersTab.click();
182+
await expect(usersTab).toHaveAttribute('aria-selected', 'true');
178183
await userListResponse;
179184
}
180185
}
181-
await page.waitForSelector('[data-testid="loader"]', { state: 'detached' });
186+
187+
await waitForAllLoadersToDisappear(page);
182188

183189
const ownerSearchBar = await page
184190
.getByTestId(`owner-select-${lowerCase(type)}-search-bar`)

0 commit comments

Comments
 (0)