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

fix: improve decoding of special chars in source paths #14679

Merged
merged 3 commits into from
Jan 22, 2021
Merged

Conversation

panzarino
Copy link
Contributor

@panzarino panzarino commented Jan 21, 2021

User facing changelog

Fixes issues where special characters in file names would not be decoded correctly.

Additional details

This improves the display of file names in the codeframe and stack trace. In addition, it fixes the Open In IDE button for these specs and allows Studio to properly save to these files.

How has the user experience changed?

For a file named cypress/integration/spec%with space &^$ emoji👍_你好.js

Previous code frame:
Screen Shot 2021-01-21 at 8 35 43 PM

New code frame:
Screen Shot 2021-01-21 at 8 36 06 PM

In addition to fixing the display, opening in ide and saving to file in studio now also work.

PR Tasks

  • Have tests been added/updated?
  • Has the original issue or this PR been tagged with a release in ZenHub?
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 21, 2021

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Jan 21, 2021



Test summary

9266 0 118 3Flakiness 1


Run details

Project cypress
Status Passed
Commit f132959
Started Jan 22, 2021 1:45 AM
Ended Jan 22, 2021 1:58 AM
Duration 12:54 💡
OS Linux Debian - 10.5
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/retries.ui.spec.js Flakiness
1 runner/cypress retries.ui.spec > opens attempt on each attempt failure for the screenshot, and closes after test passes

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@panzarino panzarino marked this pull request as ready for review January 22, 2021 01:42
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I appreciate the thorough comments. I manually tested the Studio and IDE opening with files with special characters and it works fine.

Files with % character in them don't even open in the TR. The code is fine covering this but I don't think this is an actual use case until we fix that.

Screen Shot 2021-01-22 at 10 16 58 AM

@jennifer-shehane
Copy link
Member

Ignore percy snapshots - going to fix flake in #14687

@panzarino
Copy link
Contributor Author

@jennifer-shehane Are you sure that's not just an empty test file? The screenshots that I provided in the initial comment show an example of a spec with % in the title.

Looks like e2e tests are legitimately failing so I'll have to figure out why before this can be merged.

@jennifer-shehane
Copy link
Member

lol. yeah, I did not read the error message 🙈

@panzarino
Copy link
Contributor Author

@jennifer-shehane Could you check out the failing e2e tests? I've rerun them a couple times and they continue to fail which indicates its not flake but they're passing locally for me.

@jennifer-shehane
Copy link
Member

@panzarino Didn't they pass this time? I think it's that new stdio PR introducing flake. :/

@panzarino
Copy link
Contributor Author

@jennifer-shehane Yup - probably flake so I'm gonna go ahead and merge

@panzarino panzarino merged commit 255b3fd into develop Jan 22, 2021
pashidlos pushed a commit to pashidlos/cypress that referenced this pull request Jan 30, 2021
@emilyrohrbough emilyrohrbough deleted the issue-14959 branch August 1, 2024 13:50
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.

Studio unable to save to files with special characters in path
2 participants