Refactored grabValueFrom and seeInFields #2414

Merged
merged 3 commits into from Sep 29, 2015

Conversation

Projects
None yet
2 participants
@DavertMik
Member

DavertMik commented Sep 29, 2015

This should reduce code duplication and allow using seeInField and dontSeeInField with disabled form fields. Fixes #2378

@zbateson @Naktibalda please review

DavertMik added some commits Sep 29, 2015

@DavertMik DavertMik added this to the 2.1.3 milestone Sep 29, 2015

@@ -1 +1 @@
-a:0:{}

This comment has been minimized.

@Naktibalda

Naktibalda Sep 29, 2015

Member

This file should be added to .gitignore, right?

@Naktibalda

Naktibalda Sep 29, 2015

Member

This file should be added to .gitignore, right?

This comment has been minimized.

@DavertMik

DavertMik Sep 29, 2015

Member

probably

@DavertMik

DavertMik Sep 29, 2015

Member

probably

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Sep 29, 2015

Member

I don't see anything wrong in this change.

Member

Naktibalda commented Sep 29, 2015

I don't see anything wrong in this change.

+ $field = new ChoiceFormField($nodes->filter('select')->getNode(0));
+ $options = $nodes->filter('option[selected]');
+ foreach ($options as $option) {
+ $values[] = $option->getAttribute('value');

This comment has been minimized.

@DavertMik

DavertMik Sep 29, 2015

Member

the strange thing that I couldn't use $field->getValue() here as it returned all options no matter if they were selected or not :(

@DavertMik

DavertMik Sep 29, 2015

Member

the strange thing that I couldn't use $field->getValue() here as it returned all options no matter if they were selected or not :(

DavertMik added a commit that referenced this pull request Sep 29, 2015

Merge pull request #2414 from Codeception/fix-select-fields
Refactored grabValueFrom and seeInFields

@DavertMik DavertMik merged commit cec92af into 2.1 Sep 29, 2015

3 checks passed

continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@DavertMik DavertMik deleted the fix-select-fields branch Sep 29, 2015

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