diff --git a/core/modules/views_ui/src/Tests/ExposedFormUITest.php b/core/modules/views_ui/src/Tests/ExposedFormUITest.php index e42b822..64c28fa 100644 --- a/core/modules/views_ui/src/Tests/ExposedFormUITest.php +++ b/core/modules/views_ui/src/Tests/ExposedFormUITest.php @@ -174,4 +174,29 @@ function testExposedAdminUi() { $this->assertEqual($display['display_options']['sorts']['created']['expose'], ['label' => $edit['options[expose][label]']]); $this->assertEqual($display['display_options']['sorts']['created']['order'], 'DESC'); } + + /** + * Tests the configuration of grouped exposed filters. + */ + public function testExposedGroupedFilter() { + // Click the Expose filter button. + $this->drupalPostForm('admin/structure/views/nojs/handler/test_exposed_admin_ui/default/filter/type', [], t('Expose filter')); + // Select 'Grouped filters' radio button. + $this->drupalPostForm('admin/structure/views/nojs/handler/test_exposed_admin_ui/default/filter/type', [], t('Grouped filters')); + // Add 3 groupings. + $edit = [ + 'options[group_button][radios][radios]' => 1, + 'options[group_info][group_items][1][title]' => '1st', + 'options[group_info][group_items][1][value][all]' => 'all', + 'options[group_info][group_items][2][title]' => '2nd', + 'options[group_info][group_items][2][value][article]' => 'article', + 'options[group_info][group_items][3][title]' => '3rd', + 'options[group_info][group_items][3][value][page]' => 'page', + ]; + // Apply the filter settings. + $this->drupalPostForm(NULL, $edit, t('Apply')); + // Check that the view is saved without errors. + $this->drupalPostForm(NULL, [], t('Save')); + $this->assertResponse(200); + } }