You are here

protected function PreviewTest::assertPreviewAJAX in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php \Drupal\Tests\views_ui\FunctionalJavascript\PreviewTest::assertPreviewAJAX()

Assert that the preview contains expected data.

Parameters

int $row_count: The expected number of rows in the preview.

2 calls to PreviewTest::assertPreviewAJAX()
PreviewTest::clickPreviewLinkAJAX in core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php
Click on a preview link.
PreviewTest::getPreviewAJAX in core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php
Get the preview form and force an AJAX preview update.

File

core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php, line 287

Class

PreviewTest
Tests the UI preview functionality.

Namespace

Drupal\Tests\views_ui\FunctionalJavascript

Code

protected function assertPreviewAJAX($row_count) {
  $elements = $this
    ->getSession()
    ->getPage()
    ->findAll('css', '.view-content .views-row');
  $this
    ->assertCount($row_count, $elements, 'Expected items found on page.');
}