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

Add example of checking selected option #23

Closed
bahmutov opened this issue Nov 3, 2017 · 15 comments · Fixed by #349
Closed

Add example of checking selected option #23

bahmutov opened this issue Nov 3, 2017 · 15 comments · Fixed by #349

Comments

@bahmutov
Copy link
Contributor

bahmutov commented Nov 3, 2017

Seems some users are struggling to correctly assert selected option. For example in

<select class=" undefined " name="country"><option value="GB">United Kingdom</option>
<option value="ES">Spain</option>
<option value="FR">France</option>
<option value="GB">United Kingdom</option>
cy.get('form')
        .find('selector').select('United Kingdom').wait(1000)
        .should('have.value', 'United Kingdom')

Which does not need wait(1000) and the value should be "GB"

We should put the example under "select in actions" https://example.cypress.io/commands/actions

@DanielStoica85
Copy link

Good suggestion!

@matt212
Copy link

matt212 commented Oct 30, 2018

how to get selected dropdown value in first place !

@jeremybowden73
Copy link

Hi, can I pick this one up please?

@bahmutov
Copy link
Contributor Author

bahmutov commented Nov 14, 2018 via email

@jeremybowden73
Copy link

Thanks. Can you confirm I'll need change these two files. Sorry if this seems obvious but this is my first contribution so I want to make sure.

https://github.com/cypress-io/cypress-example-kitchensink/blob/master/cypress/integration/examples/actions.spec.js

https://github.com/cypress-io/cypress-example-kitchensink/blob/master/app/commands/actions.html

jeremybowden73 pushed a commit to jeremybowden73/cypress-example-kitchensink that referenced this issue Nov 21, 2018
@jeremybowden73
Copy link

Submitted Pull Request. A couple of the tests are failing.

@jennifer-shehane jennifer-shehane added this to the Sprint 13 milestone Nov 26, 2018
@bahmutov
Copy link
Contributor Author

bahmutov commented Dec 5, 2018

I am looking at the failing CI runs - one of them is super weird, trying to investigate the root cause

@nids2307
Copy link

is this issue resolved?

@jennifer-shehane
Copy link
Member

This was not closed - the initial PR got stuck on some CI checks and the CLA was never signed by the author. Would be welcome to new PR.

@HiramZamoranoC
Copy link

Hi!, Can I work on this?

@jennifer-shehane
Copy link
Member

@HiramZamoranoC Yes

@swathisham
Copy link

is there any update on this?

@swathisham
Copy link

swathisham commented Jan 2, 2020

@jennifer-shehane This is really blocking our testing

@jennifer-shehane
Copy link
Member

@swathisham This is an issue to add an example to our repo, simply documentation. This has nothing to do with the functionality of the Cypress application and could not be blocking your tests.

@bahmutov
Copy link
Contributor Author

🎉 This issue has been resolved in version 1.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

8 participants