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

Error: Cannot call method 'queryByRole' of undefined(experimentalProxyless: true) #379

Open
Roy412 opened this issue Dec 21, 2022 · 0 comments

Comments

@Roy412
Copy link

Roy412 commented Dec 21, 2022

Describe the bug
Unable to use the testing-library selector with the experimentalProxyless option of testcafe enabled, which is previously proxyless.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the demo repo: https://github.com/Roy412/msw-testcafe-error/tree/testing_library_compatibility
  2. Install the packages: yarn
  3. Run the testcafe test: yarn testcafe
  4. You can see the failure with the error Error: Cannot call method 'queryByRole' of undefined

Expected behavior
The selectors should work with the experimentalProxyless option enabled.

Screenshots
Screenshot 2022-12-21 at 4 27 31 PM

Desktop (please complete the following information):

  • OS: [e.g. iOS] MacOS
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Note that it uses 2.2.0-rc.1 version of TestCafe. For older versions, the option name is proxyless.
Interestingly, withexperimentalProxyless option disabled, the test passes. And of course, the selectors from testcafe library work too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant