You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @malibagci, thanks for the report. To make sure I understand, are you reporting that the note listed here about NOTE: Unlike the intercept command, the command requires a method argument is inaccurate because when using a routeMatcher the method argument is not necessary? Once you change the syntax to exclude that argument as in cy.intercept(routeMatcher) it does work for you?
Thanks for the clarification, I see what you are saying.
@tvsbrent looks like in the intercept() method if you are using a routeMatcher argument, it needs to be the first argument or have a url as the first argument. Having the method argument is a no go. Might be worth discussing how to support since we already diverge a little bit from the intercept() method by requiring the method in all playback calls.
Library gives error when you define a routeMatcher like below:
cy.playback( 'GET', { url: new RegExp('^/*/'), headers: { 'Content-Type': 'application/json', }, }, { matching: { ignores: ['hostname', 'port'] }, }, );
return cy.intercept(method, routeMatcher,...
does not match with any syntax of these in Cypress Docs.Please see: https://docs.cypress.io/api/commands/intercept#Syntax
Removing first parameter "method" fixes the issue.
Regards
The text was updated successfully, but these errors were encountered: