public function WindowTest::testResizeWindow in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/driver-testsuite/tests/Js/WindowTest.php \Behat\Mink\Tests\Driver\Js\WindowTest::testResizeWindow()
File
- vendor/
behat/ mink/ driver-testsuite/ tests/ Js/ WindowTest.php, line 58
Class
Namespace
Behat\Mink\Tests\Driver\JsCode
public function testResizeWindow() {
$this
->getSession()
->visit($this
->pathTo('/index.html'));
$session = $this
->getSession();
$session
->resizeWindow(400, 300);
$session
->wait(1000, 'false');
$script = 'return Math.abs(window.outerHeight - 300) <= 100 && Math.abs(window.outerWidth - 400) <= 100;';
$this
->assertTrue($session
->evaluateScript($script));
}