Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update XHR logs with response data when it arrives #66

Merged
merged 1 commit into from
Nov 29, 2020

Conversation

peruukki
Copy link
Contributor

@peruukki peruukki commented Nov 29, 2020

Update XHR logs with server response data when it arrives:

  • always show response status code and description, in the same format as we do for cy.request
  • always show request duration (as reported by Cypress)
  • show response body if the status code is a non-successful one and we haven't already logged the response body in a cy:route log

This required quite a lot of changes but most of them are related to tests. We might also want to document when the XHR response body is included in the logs, but I didn't find a suitable existing place in the README, and that can also be done separately if wanted.

Resolves #61.

- always show response status code and description, in the same format as
  we do for cy.request

- always show request duration (as reported by Cypress)

- show response body if the status code is a non-successful one and we
  haven't already logged the response body in a cy:route log
@archfz
Copy link
Owner

archfz commented Nov 29, 2020

Looks good. Will update readme.

@archfz archfz merged commit f71aaef into archfz:master Nov 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show XHR responses
2 participants