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

Test Cafe Script Still throwing JS Errors #8101

Closed
sparsh00 opened this issue Dec 12, 2023 · 2 comments
Closed

Test Cafe Script Still throwing JS Errors #8101

sparsh00 opened this issue Dec 12, 2023 · 2 comments
Labels
STATE: Need clarification An issue lacks information for further research. TYPE: bug The described behavior is considered as wrong (bug).

Comments

@sparsh00
Copy link

sparsh00 commented Dec 12, 2023

What is your Scenario?

As reported in #8067 the Apple Pay use case is not working on testcafe.
I built testcafe with the hammerhead proxy patch and getting a different JS error

errStack: 'Must create a new ApplePaySession from a user gesture handler.\n' + 'ApplePaySession@[native code]\n' + '_startApplePaySession@https://applepaydemo.apple.com/static/js/docCustomizedSession.js:136:32\n' + 'startApplePaySession@https://applepaydemo.apple.com/static/js/docCustomizedSession.js:98:24\n' + '@https://applepaydemo.apple.com/static/js/fixed-demo.js:48:25\n' + 'onclick@https://applepaydemo.apple.com/:1072:24\n' + 'dispatchEvent@[native code]\n' + 'dispatchEvent@https://192.168.29.183:55216/hammerhead.js:40271:61\n' + '@https://192.168.29.183:55216/hammerhead.js:40955:33\n' + '@https://192.168.29.183:55216/hammerhead.js:40885:41\n' + '@https://192.168.29.183:55216/hammerhead.js:40827:41\n' + 'dispatch@https://192.168.29.183:55216/hammerhead.js:40611:87\n' + '@https://192.168.29.183:55216/hammerhead.js:40635:25\n' + '@https://192.168.29.183:55216/hammerhead.js:40967:36\n' + '@https://192.168.29.183:55216/testcafe-automation.js:3904:39\n' + '@https://192.168.29.183:55216/testcafe-automation.js:4106:41\n' + 'step@https://192.168.29.183:55216/testcafe-automation.js:206:35\n' + '@https://192.168.29.183:55216/testcafe-automation.js:155:61\n' + '@https://192.168.29.183:55216/testcafe-automation.js:148:79\n' + 'invokeResolver@https://192.168.29.183:55216/hammerhead.js:52:12\n' + 'Promise$1@https://192.168.29.183:55216/hammerhead.js:189:17\n' + '__awaiter@https://192.168.29.183:55216/testcafe-automation.js:134:42\n' + '@https://192.168.29.183:55216/testcafe-automation.js:4101:29\n' + '@https://192.168.29.183:55216/testcafe-automation.js:4098:31\n' + '@https://192.168.29.183:55216/testcafe-automation.js:4194:41\n' + '@https://192.168.29.183:55216/testcafe-automation.js:4224:48\n' + 'invokeCallback@https://192.168.29.183:55216/hammerhead.js:68:21\n' + 'forEach@[native code]\n' + 'publish@https://192.168.29.183:55216/hammerhead.js:155:40\n' + 'publishFulfillment@https://192.168.29.183:55216/hammerhead.js:160:10\n' + 'asyncFlush@https://192.168.29.183:55216/hammerhead.js:25:20', pageDestUrl: 'https://applepaydemo.apple.com/', id: 'dJ8mABQ'
This error does not come without Test Cafe and website works fine too.
I tried things like mousedown and touch startevent but it didn't help

What is the Current behavior?

JS error coming on clicking the Apple Pay Button.

What is the Expected behavior?

No errors should come, and should move to next flowthe

What is the public URL of the test page? (attach your complete example)

https://applepaydemo.apple.com/

What is your TestCafe test code?

`
fixture("e2e")
.page("https://applepaydemo.apple.com/");

test("End to End Scenario", async (t) => {
await t.click(Selector('.applePayButtonContainer'));
await new Promise((res, _) => setTimeout(res, 80000));
})
`

Your complete configuration file

No response

Your complete test report

No response

Screenshots

Screenshot 2023-12-12 at 8 20 38 PM (2)

Steps to Reproduce

  1. Build testcafe-hammerhead repo locally
  2. Use it to build testcafe repo
  3. run the test

TestCafe version

Custom with latest hammerhead proxy

Node.js version

v16.20.2

Command-line arguments

testcafe safari -e test.js --ssl pfx=testingdomain.pfx;rejectUnauthorized=true;

Browser name(s) and version(s)

Safari 15.6.1

Platform(s) and version(s)

macOS 12.6.2

Other

No response

@sparsh00 sparsh00 added the TYPE: bug The described behavior is considered as wrong (bug). label Dec 12, 2023
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Dec 12, 2023
@aleks-pro
Copy link
Collaborator

Hello,

We cannot guarantee that the custom testcafe patch works as expected. Please try to reproduce the issue with the latest testcafe release.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Dec 21, 2023
@aleks-pro aleks-pro added STATE: Need clarification An issue lacks information for further research. STATE: Need response An issue that requires a response or attention from the team. and removed STATE: Need response An issue that requires a response or attention from the team. labels Dec 21, 2023
Copy link

This issue was automatically closed because there was no response to our request for more information from the original author. Currently, we don't have enough information to take action. Please reach out to us if you find the necessary information and are able to share it. We are also eager to know if you resolved the issue on your own and can share your findings with everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATE: Need clarification An issue lacks information for further research. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

2 participants