main icon indicating copy to clipboard operation
main copied to clipboard

Check the amount of specific route:variant are called

Open mbruggenwirth opened this issue 1 year ago • 9 comments

Is your feature request related to a problem? Please describe. In Cypress you can do the following. cy.get('@request.alias.all').should('have.length', 1) This gives me the amount the request is fired and captured. We use this quite often. for example

cy.get('@request.alias.all').should('have.length', 1)
cy.get('select').select('3.0.0')
cy.get('@request.alias.all').should('have.length', 2)

Is there a possibility to have this feature.

Describe the solution you'd like I would like to have a function I can use that tells me how often a request is fired during a single cypress test. This can be fetched by route.id:variant.id example:

cy.mocksGetRequest('route:variant.all').should('have.length', 1)
cy.get('select').select('3.0.0')
cy.mocksGetRequest('route:variant.all').should('have.length', 2)

Describe alternatives you've considered I have not found any alternative. Other then using cypress own intercepts.

Additional context No further context yet.

mbruggenwirth avatar May 02 '23 13:05 mbruggenwirth