Replies: 1 comment 2 replies
-
You may need to expand the glob you're using to listen match the route, depending on how the unique IDs look If you can get the matching to match all the routes, then you'd want to listen for 10 calls before continuing in Cypress, so you might want to use the cy.intercept(`productCatalogManagement/v4/productOfferingPrice/**`).as('getProduct')
cy.get('@getProduct.all').should('have.length', 10)
// next commands you want to run. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my application , when I navigate to a new page , there are around 10+ GET calls happening which fetches 10+ different products on to the we page from the backend ...which means all the urls are same except the last parameter which is different for 10 different products ... i.e "productCatalogManagement/v4/productOfferingPrice/0CX-1X8QWZ" the last value is different for all 10+ different API calls . But I have to wait for all 10+ calls to proceed with my next operation ... I tried creating the intercept as
cy.intercept ('productCatalogManagement/v4/productOfferingPrice/') ;
But that is waiting for only few calls and then proceeding with the next operation which will fail as all the calls are not complete yet.
Can someone help me with this if they have a solution ?
Beta Was this translation helpful? Give feedback.
All reactions