lib-innerbrowser icon indicating copy to clipboard operation
lib-innerbrowser copied to clipboard

seeOptionIsSelected should also accept value not only text

Open dwenaus opened this issue 8 years ago • 2 comments

At present this will work for PHP Browser module:

$I->seeOptionIsSelected('#select', 'My Option Text');

but this will not:

$I->seeOptionIsSelected('#select', 'my-option-value');

It would AMAZING if the second worked.

dwenaus avatar Sep 08 '16 19:09 dwenaus

would you accept a pull request for this?

dwenaus avatar Jan 02 '17 21:01 dwenaus

I'm trying to implement this but i'm struggling to find the best approach. What i'm thinking about is to add a third parameter when used for <option value="option value">option text</option> tag to specify if option text OR option value should be evaluated.

I find it hard to analyze both at the same time because in either case an assertEquals() would fail. If both are false it would be impossible to discriminate which of the two is the correct failing assertion.

Another way could be a brand new method, something like seeOptionValueIsSelected()

vjandrea avatar Mar 22 '17 20:03 vjandrea