You are here

protected function InfiniteScrollTest::assertTotalNodes in Views Infinite Scroll 8

Assert how many nodes appear on the page.

Parameters

int $total: The total nodes on the page.

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

File

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

Class

InfiniteScrollTest
Test views infinite scroll.

Namespace

Drupal\Tests\views_infinite_scroll\FunctionalJavascript

Code

protected function assertTotalNodes($total) {
  $this
    ->assertEquals($total, count($this
    ->getSession()
    ->getPage()
    ->findAll('css', '.node--type-page')));
}