cy-api icon indicating copy to clipboard operation
cy-api copied to clipboard

Return Request/Response cy-api in headless mode

Open lucasdonato opened this issue 2 years ago • 4 comments

Good morning.. please, could you create a flag so that the request and response cy-api are returned when the tests are executed in headless mode.

Open mode:

image

  • [ ] Expected scenario: Return the response and request when the test is run in headless mode as well, replicating the same behavior in open mode

lucasdonato avatar Apr 26 '22 13:04 lucasdonato

This log is very important to analyze the error when the test fails

lucasdonato avatar Apr 26 '22 13:04 lucasdonato

I’m not sure I understand what would be the difference. Mind opening a pull request with your change and a test to show it working?

Sent from my iPhone

On Apr 26, 2022, at 09:17, lucasdonato @.***> wrote:

 This log is very important to analyze the error when the test fails

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

bahmutov avatar Apr 26 '22 13:04 bahmutov

@lucasdonato you want to log request/response in Cypress run mode ?

LeJeanbono avatar Apr 28 '22 18:04 LeJeanbono

@lucasdonato you want to log request/response in Cypress run mode ?

If the test fails I want to see a log with the request data (with the headers, data in the body, URL that I sent in the request) etc.. Basically it's the data that cy-api returns in open mode.

It could be a SHOW_LOG_RUN_MODE flag for example, and if true, the log is displayed in headless mode

lucasdonato avatar Apr 28 '22 19:04 lucasdonato