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

Codeception 2.1 Default selected option dropdown not submitted #2733

Closed
vaanholtje opened this issue Jan 21, 2016 · 3 comments
Closed

Codeception 2.1 Default selected option dropdown not submitted #2733

vaanholtje opened this issue Jan 21, 2016 · 3 comments
Labels

Comments

@vaanholtje
Copy link

@vaanholtje vaanholtje commented Jan 21, 2016

When i fill a form and leave the dropdown with the default selected option.
Then this option wil not be posted when i submit the form.

Even when i try to see if the option is selected codeception tells me the dropdown doesn't exist.
$I->seeOptionIsSelected('origin_id', 'Instrumentaal');

Step I see option is selected "origin_id","Instrumentaal"
Fail Element located either by name, CSS or XPath element with 'selected option' was not found.

But when i select an option from the dropdown before the seeIfSelected then it works fine.

Looks like the select inputs are not initialized when the test starts or something?

@Naktibalda
Copy link
Member

@Naktibalda Naktibalda commented Jan 21, 2016

I can't reproduce your issue.

Codeception has a test which verifies that seeOptionIsSelected can see the default option:

public function testSeeSelectedOption()

HTML: https://github.com/Codeception/Codeception/blob/2.1/tests/data/app/view/form/select.php

Please provide HTML that you are testing, test code, and *.suite.yml of your test suite.

Naktibalda added a commit to Naktibalda/Codeception that referenced this issue Jan 22, 2016
@Naktibalda
Copy link
Member

@Naktibalda Naktibalda commented Jan 22, 2016

This issue happens then there is no selected option in the dropdown.
Expected behaviour is that the first option is selected by default.

@Naktibalda
Copy link
Member

@Naktibalda Naktibalda commented Jan 22, 2016

I fixed seeOptionIsSelected, form submission was working as expected.

Naktibalda added a commit that referenced this issue Jan 23, 2016
Fixed issue #2733
@Naktibalda Naktibalda closed this Jan 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.