Current behavior
When passing POST as the first parameter to route2 requests are not properly intercepted.
// Does not work
cy.route2('POST', `${BasePage.api_url}/events/createTemplate`).as('create_template')
cy.wait('@create_template')
// Works
cy.route2(`${BasePage.api_url}/events/createTemplate`).as('create_template')
cy.wait('@create_template')
Desired behavior
Using the method parameter should work.
Test code to reproduce
https://github.com/bhgsbatista/cypress-test-tiny/tree/route2_method_fail
Versions
Cypress v5.3.0
Windows 10