function FilterCriteriaTest::openFilterDialog

Same name in other branches
  1. 9 core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php \Drupal\Tests\views_ui\FunctionalJavascript\FilterCriteriaTest::openFilterDialog()
  2. 10 core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php \Drupal\Tests\views_ui\FunctionalJavascript\FilterCriteriaTest::openFilterDialog()
  3. 11.x core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php \Drupal\Tests\views_ui\FunctionalJavascript\FilterCriteriaTest::openFilterDialog()

Uses the 'And/Or Rearrange' link for filters to open a dialog.

1 call to FilterCriteriaTest::openFilterDialog()
FilterCriteriaTest::testFilterCriteriaDialog in core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php
Tests dialog for filter criteria.

File

core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php, line 131

Class

FilterCriteriaTest
Tests the View UI filter criteria group dialog.

Namespace

Drupal\Tests\views_ui\FunctionalJavascript

Code

protected function openFilterDialog() {
    $assert_session = $this->assertSession();
    $page = $this->getSession()
        ->getPage();
    $dropbutton = $page->find('css', '.views-ui-display-tab-bucket.filter .dropbutton-toggle button');
    $dropbutton->click();
    $add_link = $page->findById('views-rearrange-filter');
    $this->assertTrue($add_link->isVisible(), 'And/Or Rearrange button found.');
    $add_link->click();
    $assert_session->assertWaitOnAjaxRequest();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.