fixed followers test cases (#21282)

This commit is contained in:
Dhruv Parmar 2025-05-20 10:23:15 +05:30 committed by Pranita
parent 6fbe79001d
commit f1a48bfee1

View File

@ -765,6 +765,10 @@ export const unFollowEntity = async (
const unFollowResponse = page.waitForResponse( const unFollowResponse = page.waitForResponse(
`/api/v1/${endpoint}/*/followers/*` `/api/v1/${endpoint}/*/followers/*`
); );
await page.waitForLoadState('networkidle');
await page.waitForSelector('[data-testid="loader"]', {
state: 'detached',
});
await page.getByTestId('entity-follow-button').click(); await page.getByTestId('entity-follow-button').click();
await unFollowResponse; await unFollowResponse;
@ -779,7 +783,10 @@ export const validateFollowedEntityToWidget = async (
isFollowing: boolean isFollowing: boolean
) => { ) => {
await redirectToHomePage(page); await redirectToHomePage(page);
await page.waitForLoadState('networkidle');
await page.waitForSelector('[data-testid="loader"]', {
state: 'detached',
});
if (isFollowing) { if (isFollowing) {
await page.getByTestId('following-widget').isVisible(); await page.getByTestId('following-widget').isVisible();