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: make sure privileged commands can run when there is a space in the spec or support file name #31001

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Jan 31, 2025

Additional details

With the release of Cypress 14, some of the logic around stack lines and traces changed. One thing we forgot to check for when matching script to stack traces lines is whether both strings are encoded the same way. The stack trace URLs are URI encoded, but the script files are not. This means that if there is a space or unicode character in the file name we will not be able to correctly match the command invocation destination, which throws the error.

Before fix

Screenshot 2025-01-31 at 2 13 01 PM

After fix

Screenshot 2025-01-31 at 2 15 25 PM

Steps to test

How has the user experience changed?

PR Tasks

@AtofStryker AtofStryker self-assigned this Jan 31, 2025
Copy link

cypress bot commented Jan 31, 2025

cypress    Run #60189

Run Properties:  status check passed Passed #60189  •  git commit 3c467b1dac: update changelog
Project cypress
Branch Review fix/priv_command_channel
Run status status check passed Passed #60189
Run duration 17m 25s
Commit git commit 3c467b1dac: update changelog
Committer AtofStryker
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 9
Tests that did not run due to a developer annotating a test with .skip  Pending 1099
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 26542
View all changes introduced in this branch ↗︎
UI Coverage  45.43%
  Untested elements 192  
  Tested elements 164  
Accessibility  92.54%
  Failed rules  3 critical   8 serious   2 moderate   2 minor
  Failed elements 888  

cli/CHANGELOG.md Outdated
@@ -6,6 +6,7 @@ _Released 2/11/2025 (PENDING)_
**Bugfixes:**

- All commands performed in `after` and `afterEach` hooks will now correctly retry when a test fails. Commands that are actions like `.click()` and `.type()` will now perform the action in this situation also. Fixes [#2831](https://github.com/cypress-io/cypress/issues/2831).
- Privileged commands will now run correctly when a spec file or support file contains characters that require encoding. Fixes [#30933](https://github.com/cypress-io/cypress/issues/30933).
Copy link
Member

Choose a reason for hiding this comment

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

@AtofStryker Can you note that this is fixing a regression in 14.0.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants