function DisplayTest::testAddDisplay
Same name in this branch
- 10 core/modules/views_ui/tests/src/Functional/DisplayTest.php \Drupal\Tests\views_ui\Functional\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/ FunctionalJavascript/ DisplayTest.php, line 70
Class
- DisplayTest
- Tests the display UI.
Namespace
Drupal\Tests\views_ui\FunctionalJavascriptCode
public function testAddDisplay() : void {
$this->drupalGet('admin/structure/views/view/test_content_ajax');
$page = $this->getSession()
->getPage();
$page->find('css', '#views-display-menu-tabs .add')
->click();
// Wait for the animation to complete.
$this->getSession()
->wait(1000, "jQuery(':animated').length === 0;");
// Add the display.
$page->find('css', '#edit-displays-top-add-display-block')
->click();
$element = $page->findById('views-display-menu-tabs')
->findLink('Block');
$this->assertNotEmpty($element);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.