You are here

public function WindowTest::testWindowMaximize in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/driver-testsuite/tests/Js/WindowTest.php \Behat\Mink\Tests\Driver\Js\WindowTest::testWindowMaximize()

File

vendor/behat/mink/driver-testsuite/tests/Js/WindowTest.php, line 71

Class

WindowTest

Namespace

Behat\Mink\Tests\Driver\Js

Code

public function testWindowMaximize() {
  $this
    ->getSession()
    ->visit($this
    ->pathTo('/index.html'));
  $session = $this
    ->getSession();
  $session
    ->maximizeWindow();
  $session
    ->wait(1000, 'false');
  $script = 'return Math.abs(screen.availHeight - window.outerHeight) <= 100;';
  $this
    ->assertTrue($session
    ->evaluateScript($script));
}