Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<option> should be considered visible if in visible select #4473

Closed
jennifer-shehane opened this issue Jun 17, 2019 · 2 comments · Fixed by #4421
Closed

<option> should be considered visible if in visible select #4473

jennifer-shehane opened this issue Jun 17, 2019 · 2 comments · Fixed by #4421

Comments

@jennifer-shehane
Copy link
Member

Current behavior:

Asserting on an <option> visibility displays as hidden when in a visible select. It's a bit weird since you can't really select it and look at the options to see what's visible.

Desired behavior:

When asserting visibility of an <option>, it should display as visible if it's containing <select> is visible - we should assume that the functionality of how the browser renders options works.

Steps to reproduce: (app code and test code)

<select>
  <option id="option">Naruto</option>
</select>

<select>
  <optgroup id="optgroup" label='Shinobi'>
    <option>Naruto</option>
  </optgroup>
</select>
cy.get('#option').should('be.visible')
cy.get('#optgroup').should('be.visiblle')

Versions

Cypress 3.3.1

@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: work in progress stage: needs review The PR code is done & tested, needs review labels Jun 17, 2019
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Jun 19, 2019
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 19, 2019

The code for this is done in cypress-io/cypress#4421, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 27, 2019

Released in 3.3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant