filiphric / cypress-plugin-api

Cypress plugin to show your API information in the Cypress UI runner
ISC License
264 stars 35 forks source link

{ forceNetworkError: true } being presented in the url context #99

Closed guilhermesousa-cwi closed 1 year ago

guilhermesousa-cwi commented 1 year ago

I have a doubt if this is a problem or not.

✅ This scenario returned status code 500 as expected. The lib concatenated the URL + { force network error: true }. image

❌ This scenario returned status code 404 (expected 500). The lib concatenated the URL + { force network error: true }. image

PS: The difference between the two requests is that one passes at the end of the url ${posIdCnpjNull} and the other /customers with the name of the endpoint (/customers).


Version: "cypress": "^11.2.0" "cypress-plugin-api": "^2.6.1"

filiphric commented 1 year ago

this is not really a provblem od the plugin. you are not setting up the parameter correctly. also, there’s no forceNetworkError parameter in cy.request(), see Cypress docs