You are here

public function DisplayCRUDTest::testDefaultDisplay in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php \Drupal\Tests\views_ui\Functional\DisplayCRUDTest::testDefaultDisplay()
  2. 10 core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php \Drupal\Tests\views_ui\Functional\DisplayCRUDTest::testDefaultDisplay()

Tests that the correct display is loaded by default.

File

core/modules/views_ui/tests/src/Functional/DisplayCRUDTest.php, line 107

Class

DisplayCRUDTest
Tests creation, retrieval, updating, and deletion of displays in the Web UI.

Namespace

Drupal\Tests\views_ui\Functional

Code

public function testDefaultDisplay() {
  $this
    ->drupalGet('admin/structure/views/view/test_display');
  $elements = $this
    ->xpath('//*[@id="views-page-1-display-title"]');
  $this
    ->assertCount(1, $elements, 'The page display is loaded as the default display.');
}