title: Given 2 combobox, how to select an option from a select list with React Testing Library
body: <p>So i'm following this example
  <a href="https://stackoverflow.com/questions/57946870/how-to-select-an-option-from-a-select-list-with-react-testing-library">How to select an option from a select list with React Testing Library</a></p>
  <p>Now in my case i have 2 dropdown lists,</p>
  <pre><code>&lt;select data-testid=&quot;select state&quot;&gt;
    &lt;option&gt;
      CA
    &lt;/option&gt;
    &lt;option&gt;
      NY 
    &lt;/option&gt;
    &lt;option&gt;
      MA
    &lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select data-testid=&quot;select city&quot;&gt;
    &lt;option&gt;
      New York
    &lt;/option&gt;
    &lt;option&gt;
      San Diego
    &lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  <p>Assuming i only have the 1st dropdown, the test can be like this to choose 'MA'</p>
  <pre><code>it('should correctly set default option', () =&gt; {
    render(&lt;App /&gt;)
    expect(screen.getByRole('option', {name: 'CA'}).selected).toBe(true)
  })
  
  
  it('should allow ...', () =&gt; {
    render(&lt;App /&gt;)
    userEvent.selectOptions(
      // Find the select element
      screen.getByRole('combobox'),
      // Find and select the Ireland option
      screen.getByRole('option', {name: 'MA'}),
    )
    expect(screen.getByRole('option', {name: 'MA'}).selected).toBe(true)
  })
  </code></pre>
  <p>Q1: if i turn on the 2nd dropdown list, the unit test reports:
  Found multiple elements with the role &quot;combobox&quot;
  How should i update the test pls ?</p>
  <p>Q2: i tried to replace</p>
  <pre><code>screen.getByRole('combobox')
  </code></pre>
  <p>with</p>
  <pre><code>screen.getByTest('select state')
  </code></pre>
  <p>The original sample test will fail, it cannot see the other options other than the 1st default option.</p>
  <p>Any suggestions pls ?</p>