Closed pokai-chang-appier closed 1 year ago
I was able to workaround this by using --experimental-proxyless
.
We plan to add the fix to testcafe version 2.5.1. While we are preparing it you can try the release candidate version 2.5.1-rc.1 with the fix.
duplicate of https://github.com/DevExpress/testcafe/issues/7632
What is your Scenario?
(Similar to https://github.com/DevExpress/testcafe-hammerhead/issues/2858, but with a different JS feature)
We are using private class members in our JavaScript code, such as the following:
It should show alert
This should be “hi”: hi
when executed.However, when proxied via
testcafe-hammerhead
, the line:got re-written as:
which will get
undefined
instead of'hi'
.What is the Current behavior?
this.#somePrivateAttr
got re-written as__get$(this,”somePrivateAttr”)
which becomeundefined
.What is the Expected behavior?
Proxied code should get
this.#somePrivateAttr
as'hi'
correctly.What is your public website URL? (or attach your complete example)
https://moonlit-kangaroo-fd48ff.netlify.app/index.html
What is your TestCafe test code?
N/A
Your complete configuration file
No response
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
To reproduce, I prepared a simple web page, https://moonlit-kangaroo-fd48ff.netlify.app.
The HTML:
JS:
When opening this page, an alert will pop-up with
This should be "hi": hi
:But while opening the page in the Hammerhead playground, as instructed in the README, the message becomes
This should be "hi": undefined
TestCafe version
testcafe-hammerhead 44388ee2d226d83c1a67f4bdbed93bd55f97a6b4
Node.js version
v18.15.0
Command-line arguments
N/A
Browser name(s) and version(s)
No response
Platform(s) and version(s)
No response
Other
No response