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 throwing JS Errors #8067

Closed
harshitshah4 opened this issue Nov 3, 2023 · 3 comments
Closed

Test Cafe Script throwing JS Errors #8067

harshitshah4 opened this issue Nov 3, 2023 · 3 comments
Assignees
Labels
FREQUENCY: level 1 STATE: Issue accepted An issue has been reproduced. TYPE: bug The described behavior is considered as wrong (bug).

Comments

@harshitshah4
Copy link

What is your Scenario?

We are currently using test cafe to test Apple Pay demo website: https://applepaydemo.apple.com/, on opening that website Apple Pay button was not shown, initially it was due to website being not served over https and hence Apple Pay was giving error that website is not served is secure context.
Then we followed the doc: https://testcafe.io/documentation/402839/guides/advanced-guides/test-https-features-and-http2-websites
After serving the website over https, it no longer gives error for secure context.
But we are receiving another JS error:

 ✖ End to End Scenario

   1) A JavaScript error occurred on "https://applepaydemo.apple.com/".
      Repeat test actions in the browser and check the console for errors.
      Enable the “skipJsErrors” option to ignore JavaScript errors during test execution. Learn
      more: "https://testcafe.io/documentation/404038/recipes/debugging/skip-javascript-errors"
      If the website only throws this error when you test it with TestCafe, please create a new
      issue at:
      "https://github.com/DevExpress/testcafe/issues/new?template=bug-report.md".

      JavaScript error details:
      undefined is not an object (evaluating '__get$(this,"t") .innerHTML='<button><span
      id="container" /></button>'')
      rt@https://applepay.cdn-apple.com/jsapi/v1.1.0/apple-pay-button.js:94:54394
      define@[native code]
      @https://applepay.cdn-apple.com/jsapi/v1.1.0/apple-pay-button.js:94:58039
      module code@https://applepay.cdn-apple.com/jsapi/v1.1.0/apple-pay-button.js:94:58066
      evaluate@[native code]
      moduleEvaluation@[native code]
      @[native code]
      asyncFunctionResume@[native code]
      @[native code]
      promiseReactionJobWithoutPromise@[native code]
      promiseReactionJob@[native code]

      Browser: Safari 15.6.1 / macOS 10.15.7

This error does not come without Test Cafe and website works fine too.
The code also looks to be coming from Hammerhead script.

What is the Current behavior?

JS error coming and Apple Pay Button being not visible.

What is the Expected behavior?

No errors should come, and Apple Pay button should be visible.

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 new Promise((res, _) => setTimeout(res, 80000));
})

Your complete configuration file

No response

Your complete test report

No response

Screenshots

Error:
Screenshot 2023-11-03 at 12 50 32 PM

Current behavior:
Screenshot 2023-11-03 at 12 47 41 PM

Expected behavior:
Screenshot 2023-11-03 at 12 51 35 PM

Steps to Reproduce

  1. Open "https://applepaydemo.apple.com/" using Hammerhead proxy.

TestCafe version

3.3.0

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

@harshitshah4 harshitshah4 added the TYPE: bug The described behavior is considered as wrong (bug). label Nov 3, 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 Nov 3, 2023
@PavelMor25 PavelMor25 added FREQUENCY: level 1 STATE: Issue accepted An issue has been reproduced. and removed STATE: Need response An issue that requires a response or attention from the team. labels Nov 6, 2023
Copy link

github-actions bot commented Nov 6, 2023

We appreciate you taking the time to share information about this issue. We reproduced the bug and added this ticket to our internal task queue. We'll update this thread once we have news.

@CormacBrowserStack
Copy link

Hello Team,

I'm confirming this issue for a customer we have. Do we have timelines for this?

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Nov 7, 2023
@Bayheck Bayheck added the STATE: No estimations No estimations can be made at this point. label Nov 8, 2023
Copy link

github-actions bot commented Nov 8, 2023

Personal predictions can be unreliable, so we are not ready to give you an ETA. Once we make more progress, we will leave a comment.

@github-actions github-actions bot removed STATE: Need response An issue that requires a response or attention from the team. STATE: No estimations No estimations can be made at this point. labels Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FREQUENCY: level 1 STATE: Issue accepted An issue has been reproduced. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

4 participants