This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Added the verification of isSelected for options without values

  • Loading branch information...
1 parent c2d118d commit 61b3ff0bf9e0d794f11fcae4d06db55a81d392fc @stof stof committed May 17, 2014
Showing with 5 additions and 2 deletions.
  1. +3 −0 driver-testsuite/tests/Form/SelectTest.php
  2. +2 −2 driver-testsuite/web-fixtures/issue193.html
@@ -116,6 +116,9 @@ public function testOptionWithoutValue()
$session->getPage()->selectFieldOption('options-without-values', 'Two');
$this->assertEquals('Two', $session->getPage()->findById('options-without-values')->getValue());
+ $this->assertTrue($session->getPage()->findById('two')->isSelected());
+ $this->assertFalse($session->getPage()->findById('one')->isSelected());
+
$session->getPage()->selectFieldOption('options-with-values', 'two');
$this->assertEquals('two', $session->getPage()->findById('options-with-values')->getValue());
}
@@ -9,8 +9,8 @@
<form action="#">
<select id="options-without-values" name="without">
<option>none selected</option>
- <option>One</option>
- <option>Two</option>
+ <option id="one">One</option>
+ <option id="two">Two</option>
<option>Three</option>
</select>

0 comments on commit 61b3ff0

Please sign in to comment.