function AggregationAjaxTest::openDisplayOptionDialog
Same name and namespace in other branches
- main core/modules/views_ui/tests/src/FunctionalJavascript/AggregationAjaxTest.php \Drupal\Tests\views_ui\FunctionalJavascript\AggregationAjaxTest::openDisplayOptionDialog()
Opens the AJAX dialog for a display-level "Advanced" setting.
Parameters
string $option_id: The machine name of the display option to open, e.g. 'group_by'.
File
-
core/
modules/ views_ui/ tests/ src/ FunctionalJavascript/ AggregationAjaxTest.php, line 114
Class
- AggregationAjaxTest
- Tests editing a field's aggregation function via AJAX.
Namespace
Drupal\Tests\views_ui\FunctionalJavascriptCode
protected function openDisplayOptionDialog(string $option_id) : void {
$assert_session = $this->assertSession();
$link = $assert_session->waitForElementVisible('css', sprintf('a[href$="/%s"]', $option_id));
$this->assertNotEmpty($link, sprintf('The link for the "%s" display option was not found.', $option_id));
$link->click();
$this->assertNotEmpty($assert_session->waitForElementVisible('css', '.views-ui-dialog'), sprintf('The dialog for the "%s" display option did not open.', $option_id));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.