-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
modifyObstructiveCode incorrectly matches the word 'stop' #5330
Comments
paging @flotwig, he's working with our app isolation logic |
Your code is getting mangled by these regexes in the proxy which blindly replace cypress/packages/server/lib/util/security.js Lines 7 to 10 in 5654680
I am working on a PR that parses and rewrites the Javascript instead of using regexes, which I'll make sure fixes this problem: #5273 |
Yeah, I managed to work that out, awesome! Look forward to the fix! |
|
This is exactly what happened to us as well and we would have reported another bug here as well. We were just accessing a variable like this:
|
Closing as resolved. If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix. |
Current behavior:
During test run, code fails with sself not defined.
Desired behavior:
functionality of code should not be replaced
isChildTrainPlatform = stop => stop.route_type === STOP_TYPE.TRAINSTOP && stop.location_type === 0;
should not turn into
isChildTrainPlatform = stop => stop.route_type === STOP_TYPE.TRAINSTOP && sself.location_type === 0;
Steps to reproduce: (app code and test code)
code specifically with this line
return stop.route_type===WEBPACK_IMPORTED_MODULE_10__types_stop_types["a" /* default */].TRAINSTOP&&stop.location_type===0;
Versions
Cypress 3.4.1, Chrome 77
The text was updated successfully, but these errors were encountered: