I'm trying to test a code that is a part of redux-form using react-testing-library. Calling fireEvent.change for text input fields to set up new values I expect that input's values should be updated, but it never happens. Please find a fragment of the test below. Full code can be found at https://codesandbox.io/s/redux-form-simple-example-n3820 Any good examples how to test redux-form using react-testing-library?
...
const firstNameInput = getByTestId(container, "firstName");
const lastNameInput = getByTestId(container, "lastName");
const firstName = "firstName";
const lastName = "lastName";
fireEvent.change(firstNameInput, { target: { value: firstName } });
fireEvent.change(lastNameInput, { target: { value: lastName } });
const submitButton = getByTestId(container, "submitButton");
fireEvent.click(submitButton);
expect(onSubmit).toHaveBeenCalledTimes(1);
expect(onSubmit).toHaveBeenNthCalledWith(firstName, lastName);