Security update for permissions_by_term
[yaffs-website] / vendor / behat / mink-selenium2-driver / tests / Custom / TimeoutTest.php
1 <?php
2
3 namespace Behat\Mink\Tests\Driver\Custom;
4
5 use Behat\Mink\Tests\Driver\TestCase;
6
7 class TimeoutTest extends TestCase
8 {
9     /**
10      * @expectedException \Behat\Mink\Exception\DriverException
11      */
12     public function testInvalidTimeoutSettingThrowsException()
13     {
14         $this->getSession()->getDriver()->setTimeouts(array('invalid' => 0));
15     }
16
17     public function testShortTimeoutDoesNotWaitForElementToAppear()
18     {
19         $this->getSession()->getDriver()->setTimeouts(array('implicit' => 0));
20
21         $this->getSession()->visit($this->pathTo('/js_test.html'));
22         $this->findById('waitable')->click();
23
24         $element = $this->getSession()->getPage()->find('css', '#waitable > div');
25
26         $this->assertNull($element);
27     }
28
29     public function testLongTimeoutWaitsForElementToAppear()
30     {
31         $this->getSession()->getDriver()->setTimeouts(array('implicit' => 5000));
32
33         $this->getSession()->visit($this->pathTo('/js_test.html'));
34         $this->findById('waitable')->click();
35         $element = $this->getSession()->getPage()->find('css', '#waitable > div');
36
37         $this->assertNotNull($element);
38     }
39 }