You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are testing a web application's build with TestCafe in a local browser like Edge. The application has been based on Angular 17 recently. Everything was working well there. Currently we are trying to upgrade to Angular 19.
What is the Current behavior?
After upgrading to Angular 19, all TestCafe-based tests fail for the application fails to load in any test scenario.
Analysis has found that Hammerhead is transforming occurrences of location into __get$Loc(location) and it is failing to recognize certain cases in which that replacement is breaking the code.
This is part of code built by ng19:
The highlighted part gets replaced by hammerhead:
The causing code is here:
The transformation fails to recognize location being declared as instance property of that class. The code in question is part of Angular, thus there is no way that we could work around this issue on our end:
What is the Expected behavior?
Hammerhead should be aware of property declarations in classes when transforming code on the fly.
The application should load.
What is your public website URL? (or attach your complete example)
closed source ... must not share
What is your TestCafe test code?
does not apply here
Your complete configuration file
No response
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
build application with ng19
try testing it with testcafe
TestCafe version
3.7.1
Node.js version
22.11.0
Command-line arguments
testcafe is run through gherkin-testcafe
Browser name(s) and version(s)
No response
Platform(s) and version(s)
Windows 11
Other
typescript 5.4.5
The text was updated successfully, but these errors were encountered:
Thank you for submitting a bug report. We would love to help you investigate the issue. Please share a simple code example that reliably reproduces the bug. For more information, read the following article: How To Create a Minimal Working Example When You Submit an Issue. We look forward to your response.
What is your Scenario?
We are testing a web application's build with TestCafe in a local browser like Edge. The application has been based on Angular 17 recently. Everything was working well there. Currently we are trying to upgrade to Angular 19.
What is the Current behavior?
After upgrading to Angular 19, all TestCafe-based tests fail for the application fails to load in any test scenario.
Analysis has found that Hammerhead is transforming occurrences of
location
into__get$Loc(location)
and it is failing to recognize certain cases in which that replacement is breaking the code.This is part of code built by ng19:
The highlighted part gets replaced by hammerhead:
The causing code is here:
The transformation fails to recognize
location
being declared as instance property of that class. The code in question is part of Angular, thus there is no way that we could work around this issue on our end:What is the Expected behavior?
What is your public website URL? (or attach your complete example)
closed source ... must not share
What is your TestCafe test code?
does not apply here
Your complete configuration file
No response
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
TestCafe version
3.7.1
Node.js version
22.11.0
Command-line arguments
testcafe is run through gherkin-testcafe
Browser name(s) and version(s)
No response
Platform(s) and version(s)
Windows 11
Other
typescript 5.4.5
The text was updated successfully, but these errors were encountered: