(qwik/testing) trigger on input type="checkbox" with userEvent from createDOM
#286
Replies: 5 comments
-
|
So when I run your test the generated DOM is this: <input type="checkbox" class="..." />There is no Normally where you have In your case, the SolutionI am not sure what the right solution is so I would like to start a discussion. Here are the potential outcomes.
Would love to hear your thoughts. |
Beta Was this translation helpful? Give feedback.
-
|
if the behaviour of |
Beta Was this translation helpful? Give feedback.
-
|
it seems they had a similar discussion in the |
Beta Was this translation helpful? Give feedback.
-
|
I see, so your suggestion is that we should incorporate https://github.com/testing-library/user-event into Any chance you could take that on as a PR? |
Beta Was this translation helpful? Give feedback.
-
|
We moved this issue to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Which component is affected?
Qwik Rollup / Vite plugin
Describe the bug
I'm trying to trigger a click on a checkbox in a vitest using
userEventdoesn't change thecheckedvalue of a checkboxreplacing
userEvent(selector, 'click')withscreen.querySelector(selector).click()works as expectedReproduction
https://github.com/riencoertjens/qwik-vitest/blob/main/src/components/example/checkbox.test.tsx#L22
Steps to reproduce
npm install+npm run test.uniton reproduction repo shows the passing and failing testsSystem Info
System: OS: macOS 13.5.2 CPU: (10) arm64 Apple M1 Pro Memory: 1.35 GB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v18.16.0/bin/yarn npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm Browsers: Brave Browser: 117.1.58.127 Chrome: 117.0.5938.92 Firefox: 116.0.3 Safari: 16.6 npmPackages: @builder.io/qwik: ^1.2.12 => 1.2.12 @builder.io/qwik-city: ^1.2.12 => 1.2.12 undici: 5.22.1 => 5.22.1 vite: 4.4.7 => 4.4.7Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions