add this script to package.json "testcafe": "testcafe chrome:headless"
Run test yarn testcafe | npm run testcafe
See error
Getting Started
✖ first test
1) An error occurred in Selector code:
Error: Cannot call method 'getByRole' of undefined
**Expected behavior**
Expected to be able to use getBy findBy queryBy (none of these options worked)
**Desktop (please complete the following information):**
- OS: [macOS 12.4] (Apple M1 Chip)
- Browser [chrome]
- Version [e.g. 103.0.5060.53]
**Additional context**
Add any other context about the problem here.
Describe the bug Unable to use @testing-library/testcafe selectors in tests.
To Reproduce Steps to reproduce the behavior:
fixture
Getting Started
.pagehttps://devexpress.github.io/testcafe/example
;test("first test", async (t) => { // also attempted to // const group = screen.getByRole('group', { name: /your name:/i}); // within(group).getByRole('textbox');
await t .typeText(screen.getByRole("textbox", { name: /name/i }), "John Smith") .click(screen.getByRole("button", { name: /submit/i }));
await t .expect( screen.getByRole("heading", { name: /thank you, john smith!/i, }).exists ) .ok(); });
add this script to package.json
"testcafe": "testcafe chrome:headless"
Run test
yarn testcafe | npm run testcafe
See error