playwright: fix waitForAllLoadersToDisappear fn was not working as expected (#23822)

* playwright: fix waitForAllLoadersToDisappear fn was not working as expected

* revert playwright.config.ts changes
This commit is contained in:
Shailesh Parmar 2025-10-10 17:59:14 +05:30 committed by GitHub
parent b253105875
commit 1fa5641590
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,12 +43,12 @@ import { sidebarClick } from './sidebar';
export const waitForAllLoadersToDisappear = async ( export const waitForAllLoadersToDisappear = async (
page: Page, page: Page,
dataTestId = 'loader', dataTestId = 'loader',
timeout = 5000 timeout = 30000
) => { ) => {
await page.waitForSelector(`[data-testid="${dataTestId}"]`, { const loaders = page.locator(`[data-testid="${dataTestId}"]`);
state: 'detached',
timeout, // Wait for the loader elements count to become 0
}); await expect(loaders).toHaveCount(0, { timeout });
}; };
export const visitEntityPage = async (data: { export const visitEntityPage = async (data: {