comparison vendor/behat/mink-selenium2-driver/tests/Custom/TimeoutTest.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents
children 129ea1e6d783
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
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 }