Closed
Description
react-testing-library
version: 4.1.3react
version: 16.4.1node
version: 11.10.1npm
(oryarn
) version: 6.7.0
Relevant code or config:
const select = await waitForElement(() =>
getByTestId("select-testid")
);
select.value = "testValue";
fireEvent.change(select);
<Select
className={classes.select}
onChange={this.handleSelectChange}
value={selectedValue}
inputProps={{
id: "select-id",
"data-testid": "select-id"
}}
>
What you did:
I am trying to fire the onChange method of the Material UI Select.
What happened:
onChange won't fire.
Also tried with
select.dispatchEvent(new Event('change', { bubbles: true }));
Metadata
Metadata
Assignees
Labels
No labels