How do you check a checkbox in react-testing-library? : <p>I cant seem to find much/any docs on this really simple thing I'm trying to achieve</p>

<p>I have a dropdown that is <code>display: none</code>. when I click a checkbox it becomes <code>display: block</code>
all I'm trying to assert is when I click the checkbox, it shows the dropdown</p>

<pre><code> expect(getByLabelText('Locale')).toHaveStyle(`
  display: none;
`)

getByLabelText('Locale').checked = true

expect(getByLabelText('Locale')).toHaveStyle(`
  display: block;
`)
</code></pre>

<p>the code works as expected but the test is failing on the second expect block saying: it should still be <code>display: none</code></p>

<p>is the correct way to assert this?</p>

<p>when I click the checkbox it updates 2 attributes in my object to <code>true</code> which is how it renders in the code. when I manually pass these attributes the test still fails but it fails in the first expectation. </p>

<p>I feel like I need to do something like <code>setProps</code></p>

<p>I have now tried to use <code>renderWithRedux</code> but it doesn't seem to be firing my action creator correctly?</p>

<p>is <code>fireEvent.click(queryByTestId('LocaleCheckbox'))</code> the best thing to try and update a checkbox?</p>
