Skip to content

Commit

Permalink
fix cypress for the Customzie Landing and EntityVersion page (#17744)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashish8689 authored Sep 6, 2024
1 parent 1a27645 commit dcad829
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ export const getTextDiff = (
}

if (
newText.includes(imagePlaceholder) ||
oldText.includes(imagePlaceholder)
newText?.includes(imagePlaceholder) ||
oldText?.includes(imagePlaceholder)
) {
return newText;
}
Expand Down

0 comments on commit dcad829

Please sign in to comment.