Codeception 2.1 Default selected option dropdown not submitted #2733

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

Comments

Projects
None yet
3 participants
@vaanholtje

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

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Jan 21, 2016

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Jan 22, 2016

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Jan 22, 2016

Member

I fixed seeOptionIsSelected, form submission was working as expected.

Member

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

@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