Skip to content

Commit

Permalink
Merge pull request #226 from minkphp/safeguard
Browse files Browse the repository at this point in the history
Add safeguard for not found elements in the driver-specific tests
  • Loading branch information
stof committed Jan 27, 2016
2 parents a67b841 + 0429fcf commit 9435361
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/Custom/TimeoutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ class TimeoutTest extends TestCase
*/
public function testInvalidTimeoutSettingThrowsException()
{
$this->getSession()->getDriver()->setTimeouts(array('invalid'=>0));
$this->getSession()->getDriver()->setTimeouts(array('invalid' => 0));
}

public function testShortTimeoutDoesNotWaitForElementToAppear()
{
$this->getSession()->getDriver()->setTimeouts(array('implicit'=>0));
$this->getSession()->getDriver()->setTimeouts(array('implicit' => 0));

$this->getSession()->visit($this->pathTo('/js_test.html'));
$this->getSession()->getPage()->findById('waitable')->click();
$this->findById('waitable')->click();

$element = $this->getSession()->getPage()->find('css', '#waitable > div');

Expand All @@ -28,10 +28,10 @@ public function testShortTimeoutDoesNotWaitForElementToAppear()

public function testLongTimeoutWaitsForElementToAppear()
{
$this->getSession()->getDriver()->setTimeouts(array('implicit'=>5000));
$this->getSession()->getDriver()->setTimeouts(array('implicit' => 5000));

$this->getSession()->visit($this->pathTo('/js_test.html'));
$this->getSession()->getPage()->findById('waitable')->click();
$this->findById('waitable')->click();
$element = $this->getSession()->getPage()->find('css', '#waitable > div');

$this->assertNotNull($element);
Expand Down

0 comments on commit 9435361

Please sign in to comment.