You are here

protected function InfiniteScrollTest::scrollTo in Views Infinite Scroll 8

Scroll to a pixel offset.

Parameters

int $pixels: The pixel offset to scroll to.

1 call to InfiniteScrollTest::scrollTo()
InfiniteScrollTest::testInfiniteScroll in tests/src/FunctionalJavascript/InfiniteScrollTest.php
Test infinite scrolling under different conditions.

File

tests/src/FunctionalJavascript/InfiniteScrollTest.php, line 136

Class

InfiniteScrollTest
Test views infinite scroll.

Namespace

Drupal\Tests\views_infinite_scroll\FunctionalJavascript

Code

protected function scrollTo($pixels) {
  $this
    ->getSession()
    ->getDriver()
    ->executeScript("window.scrollTo(null, {$pixels});");
}