Skip to content

Conversation

@astone123
Copy link
Contributor

@astone123 astone123 commented Oct 10, 2025

Additional details

This PR fixes the invocation details when it has been re-written as itGrep which happens in the @cypress/grep and @bahmutov/cy-grep plugins. This allows us to determine the correct invocation details for the test.

Steps to test

I tested this with the @bahmutov/cy-grep package. Install the package and register it in your support file in accordance with the documentation. Open Cypress Studio by clicking the "edit in studio" button next to a test. Verify that the test content is loaded correctly and you can edit and save the test as expected.

How has the user experience changed?

Users of @bahmutov/cy-grep package can now use studio as intended

PR Tasks


Note

Removes itGrep frames from error stacks to correctly resolve invocation details, with a unit test covering grep-modified stacks.

  • Driver:
    • Stack processing: Add stackWithGrepLinesRemoved to filter lines containing itGrep.
    • Invocation details: Update getInvocationDetails to drop itGrep frames after trimming to spec frames.
  • Tests:
    • Add unit test ensuring grep-modified stack traces resolve to the correct spec file/line via getSourcePosition.

Written by Cursor Bugbot for commit b6bc0f5. This will update automatically on new commits. Configure here.

@astone123 astone123 self-assigned this Oct 10, 2025
@astone123 astone123 closed this Oct 10, 2025
@cypress
Copy link

cypress bot commented Oct 10, 2025

cypress    Run #66904

Run Properties:  status check passed Passed #66904  •  git commit b6bc0f5637: Merge branch 'develop' into astone123/fix-itgrep-trace
Project cypress
Branch Review astone123/fix-itgrep-trace
Run status status check passed Passed #66904
Run duration 19m 56s
Commit git commit b6bc0f5637: Merge branch 'develop' into astone123/fix-itgrep-trace
Committer Adam Stone-Lord
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 15
Tests that did not run due to a developer annotating a test with .skip  Pending 1102
Tests that did not run due to a failure in a mocha hook  Skipped 4
Tests that passed  Passing 26755
View all changes introduced in this branch ↗︎

Warning

Partial Report: The results for the Application Quality reports may be incomplete.

UI Coverage  45.61%
  Untested elements 187  
  Tested elements 161  
Accessibility  97.98%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

@astone123
Copy link
Contributor Author

@mschile @mabela416
After looking at fixing this on the cloud side for a bit, I think the best way to handle the grep stack issue is with a solution like this on the app side. We use the invocation details in various places across the app to decide which test to focus in studio mode and other things, so normalizing the stack on the cloud side doesn't fix the issue entirely. Let me know what you think

@astone123 astone123 reopened this Oct 28, 2025
@astone123 astone123 requested a review from mabela416 October 28, 2025 13:07
Copy link
Contributor

@mabela416 mabela416 left a comment

Choose a reason for hiding this comment

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

I tested it locally and it works

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.

3 participants