fix cypress for the Customzie Landing and EntityVersion page (#17744)

This commit is contained in:
Ashish Gupta 2024-09-06 16:53:00 +05:30 committed by GitHub
parent 1a276450fa
commit dcad829a80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 4 deletions

View File

@ -55,14 +55,18 @@ export const navigateToCustomizeLandingPage = ({
`/api/v1/docStore/name/persona.${personaName}.Page.LandingPage`,
'getCustomPageData'
);
interceptURL('GET', `/api/v1/users/*?fields=follows%2Cowns`, 'getMyData');
interceptURL(
'GET',
'/api/v1/search/query?q=*%20AND%20followers:**',
'getFollowersData'
);
cy.get(
`[data-testid="persona-details-card-${personaName}"] [data-testid="customize-page-button"]`
).click();
verifyResponseStatusCode('@getCustomPageData', customPageDataResponse);
verifyResponseStatusCode('@getMyData', 200);
verifyResponseStatusCode('@getFollowersData', 200);
};
export const saveLayout = () => {

View File

@ -176,8 +176,8 @@ export const getTextDiff = (
}
if (
newText.includes(imagePlaceholder) ||
oldText.includes(imagePlaceholder)
newText?.includes(imagePlaceholder) ||
oldText?.includes(imagePlaceholder)
) {
return newText;
}