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

Show path of requests in log #20009

Closed
edikdeisling opened this issue Feb 2, 2022 · 3 comments · Fixed by #20019
Closed

Show path of requests in log #20009

edikdeisling opened this issue Feb 2, 2022 · 3 comments · Fixed by #20019
Labels
topic: cy.request Issues related to cy.request command type: enhancement Requested enhancement of existing feature type: user experience Improvements needed for UX

Comments

@edikdeisling
Copy link
Contributor

What would you like?

Hello,
when I use cy.request it's shown in logs as full url with scheme, domain etc.
I think it would be better to show it the same way as fetch with only pathname.
image

Why is this needed?

When I try to investigate what was wrong by looking on screenshot it 's always pain with cy.request. You have to go inside the test to match steps sequence and understand what was these request.

Other

No response

@flotwig
Copy link
Contributor

flotwig commented Feb 2, 2022

@edikdeisling this would be a good thing to add. Other commands, as you've noticed, display the relative path when the request is to the current window.location.origin, and the absolute URL otherwise. Would you like to open a PR? It should be a relatively simple fix in packages/driver/src/cy/commands/request.ts with tests added/updated in packages/driver/cypress/integration/commands/request_spec.js.

@flotwig flotwig added topic: cy.request Issues related to cy.request command type: enhancement Requested enhancement of existing feature type: user experience Improvements needed for UX labels Feb 2, 2022
edikdeisling added a commit to edikdeisling/cypress that referenced this issue Feb 2, 2022
@cypress-bot cypress-bot bot added the stage: needs review The PR code is done & tested, needs review label Feb 2, 2022
edikdeisling added a commit to edikdeisling/cypress that referenced this issue Feb 2, 2022
@cypress-bot cypress-bot bot added stage: product review stage: needs review The PR code is done & tested, needs review and removed stage: needs review The PR code is done & tested, needs review stage: product review labels Feb 3, 2022
flotwig added a commit that referenced this issue Feb 8, 2022
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Zach Bloomquist <git@chary.us>
Co-authored-by: Zach Bloomquist <github@chary.us>
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Feb 8, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 8, 2022

The code for this is done in cypress-io/cypress#20019, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 15, 2022

Released in 9.5.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v9.5.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: cy.request Issues related to cy.request command type: enhancement Requested enhancement of existing feature type: user experience Improvements needed for UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants