Skip to content

Support the change event for <input type="range"> #871

Open
@illright

Description

@illright

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 of user-event.

Suggested solution

Similarly to selectOptions, I would like to have something like this:

await userEvent.setValueInRange(screen.getByRole('slider'), 50);

Other ideas for the name could be dragTo, moveSliderTo.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds specificationThe desired behavior is not defined yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions