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

Moved the test for select options without values to SelectTest

Having this test in the JS tests does not make sense. The test does not
involve any javascript.
  • Loading branch information...
1 parent 0911e28 commit c2d118d7cd59c13d2ed0a6de00f5bbeca0be9b12 @stof stof committed May 17, 2014
@@ -105,6 +105,21 @@ public function testSetValueMultiSelect()
$this->assertEquals(array('1', '2'), $select->getValue());
}
+ /**
+ * @see https://github.com/Behat/Mink/issues/193
+ */
+ public function testOptionWithoutValue()
+ {
+ $session = $this->getSession();
+ $session->visit($this->pathTo('/issue193.html'));
+
+ $session->getPage()->selectFieldOption('options-without-values', 'Two');
+ $this->assertEquals('Two', $session->getPage()->findById('options-without-values')->getValue());
+
+ $session->getPage()->selectFieldOption('options-with-values', 'two');
+ $this->assertEquals('two', $session->getPage()->findById('options-with-values')->getValue());
+ }
+
/**
* @see https://github.com/Behat/Mink/issues/131
*/
@@ -32,20 +32,6 @@ public function testDragDrop()
$this->assertEquals('Dropped!', $droppable->find('css', 'p')->getText());
}
- // TODO reevaluate this test as it is passing only for Selenium2Driver
- // test select option without value
- public function testIssue193()
- {
- $session = $this->getSession();
- $session->visit($this->pathTo('/issue193.html'));
-
- $session->getPage()->selectFieldOption('options-without-values', 'Two');
- $this->assertEquals('Two', $session->getPage()->findById('options-without-values')->getValue());
-
- $session->getPage()->selectFieldOption('options-with-values', 'two');
- $this->assertEquals('two', $session->getPage()->findById('options-with-values')->getValue());
- }
-
// test accentuated char in button
public function testIssue225()
{
@@ -7,14 +7,14 @@
<body>
<form action="#">
- <select id="options-without-values">
+ <select id="options-without-values" name="without">
<option>none selected</option>
<option>One</option>
<option>Two</option>
<option>Three</option>
</select>
- <select id="options-with-values">
+ <select id="options-with-values" name="with">
<option value="none">none selected</option>
<option value="one">One</option>
<option value="two">Two</option>

0 comments on commit c2d118d

Please sign in to comment.