-
Notifications
You must be signed in to change notification settings - Fork 251
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
Support the change event for <input type="range">
#871
Comments
I would be willing to implement this feature with some guidance |
The problem with utility APIs like An Keyboard interaction should be easy to implement. |
In the meantime, this works fine: import { fireEvent } from '@testing-library/dom'; // or `@testing-library/react`
// ...
const slider = container.querySelector('input[type="range"]')!;
fireEvent.change(slider, { target: { value: 170 } }); But it would be cool to see support for this in |
I've tried using Meanwhile, we can achieve this with fireEvent like @illright says, in my case I used
|
+1 to get support for this |
1 similar comment
+1 to get support for this |
Sadly there is no support for simulating a keyboard usage. Like so: ```js await userEvent.keyboard('[ArrowRight]') ``` - userEvent issue: testing-library/user-event#871 So no tests on this one.
Sadly there is no support for simulating a keyboard usage. Like so: ```js await userEvent.keyboard('[ArrowRight]') ``` - userEvent issue: testing-library/user-event#871 So no tests on this one.
Sadly there is no support for simulating a keyboard usage. Like so: ```js await userEvent.keyboard('[ArrowRight]') ``` - userEvent issue: testing-library/user-event#871 So I thought, maybe its time to add an e2e test for a Eufemia component as well. And I can confirm that the test fails without the "fix". With mouse: https://github.com/dnbexperience/eufemia/assets/1501870/ce03fac9-d4ec-405c-b672-ac6e679f4771 With keyboard: https://github.com/dnbexperience/eufemia/assets/1501870/8a60adc4-01d8-45ac-8977-13ab2129749f With keyboard after the fix: https://github.com/dnbexperience/eufemia/assets/1501870/e474091c-3646-4a20-a555-3eac77086872
Hi there! if there are plans to integrate |
Problem description
I want to test that my
<input type="range">
calls the necessary function upon moving the slider thumb to a particular value. So far, it doesn't seem to be possible with the current capabilities ofuser-event
.Suggested solution
Similarly to
selectOptions
, I would like to have something like this:Other ideas for the name could be
dragTo
,moveSliderTo
.Additional context
No response
The text was updated successfully, but these errors were encountered: