You are here

protected function ThunderImageCompareTestTrait::setWindowSize in Thunder 8.2

Set size of browser window.

Parameters

array $windowSize: New size for window. Associative array with width and height keys.

1 call to ThunderImageCompareTestTrait::setWindowSize()
ThunderImageCompareTestTrait::compareScreenToImage in tests/src/FunctionalJavascript/ThunderImageCompareTestTrait.php
Compare screen part to image of previous screenshot.

File

tests/src/FunctionalJavascript/ThunderImageCompareTestTrait.php, line 66

Class

ThunderImageCompareTestTrait
Trait for creating and comparing of screenshots.

Namespace

Drupal\Tests\thunder\FunctionalJavascript

Code

protected function setWindowSize(array $windowSize) {
  $this
    ->getSession()
    ->getDriver()
    ->resizeWindow($windowSize['width'], $windowSize['height']);
  $this
    ->assertSession()
    ->assertWaitOnAjaxRequest();
}