function DisplayTest::testAddDisplay
Same name in this branch
- 10 core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php \Drupal\Tests\views_ui\FunctionalJavascript\DisplayTest::testAddDisplay()
Same name in other branches
- 9 core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php \Drupal\Tests\views_ui\FunctionalJavascript\DisplayTest::testAddDisplay()
- 9 core/modules/views_ui/tests/src/Functional/DisplayTest.php \Drupal\Tests\views_ui\Functional\DisplayTest::testAddDisplay()
- 8.9.x core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php \Drupal\Tests\views_ui\FunctionalJavascript\DisplayTest::testAddDisplay()
- 8.9.x core/modules/views_ui/tests/src/Functional/DisplayTest.php \Drupal\Tests\views_ui\Functional\DisplayTest::testAddDisplay()
- 11.x core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php \Drupal\Tests\views_ui\FunctionalJavascript\DisplayTest::testAddDisplay()
- 11.x core/modules/views_ui/tests/src/Functional/DisplayTest.php \Drupal\Tests\views_ui\Functional\DisplayTest::testAddDisplay()
Tests adding a display.
File
-
core/
modules/ views_ui/ tests/ src/ Functional/ DisplayTest.php, line 39
Class
- DisplayTest
- Tests the display UI.
Namespace
Drupal\Tests\views_ui\FunctionalCode
public function testAddDisplay() : void {
$view = $this->randomView();
$this->assertSession()
->elementNotExists('xpath', '//li[@data-drupal-selector="edit-displays-top-tabs-block-1"]');
$this->assertSession()
->elementNotExists('xpath', '//li[@data-drupal-selector="edit-displays-top-tabs-block-2"]');
$this->assertSession()
->pageTextMatchesCount(0, '/Block name:/');
$this->submitForm([], 'Add Block');
$this->assertSession()
->elementTextContains('xpath', '//li[@data-drupal-selector="edit-displays-top-tabs-block-1"]', 'Block*');
$this->assertSession()
->elementNotExists('xpath', '//li[@data-drupal-selector="edit-displays-top-tabs-block-2"]');
$this->assertSession()
->pageTextMatchesCount(1, '/Block name:/');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.