diff --git a/core/modules/views_ui/src/Tests/FilterUITest.php b/core/modules/views_ui/src/Tests/FilterUITest.php index 4d8f5fe..506658c 100644 --- a/core/modules/views_ui/src/Tests/FilterUITest.php +++ b/core/modules/views_ui/src/Tests/FilterUITest.php @@ -73,6 +73,26 @@ public function testFiltersUI() { $this->drupalGet('admin/structure/views/view/test_filter_groups'); $this->assertLink('Content: Node ID (= 1)', 0, 'Content: Node ID (= 1) link appears correctly.'); + + // Tests that we can create a new filter group from UI. + $this->drupalGet('admin/structure/views/nojs/rearrange-filter/test_filter_groups/page'); + $this->assertNoRaw('Group 3', 'Group 3 has not been added yet.'); + + // Create 2 new groups. + $this->drupalPostForm(NULL, [], t('Create new filter group')); + $this->drupalPostForm(NULL, [], t('Create new filter group')); + + // Remove the new group 3. + $this->drupalPostForm(NULL, [], t('Remove group 3')); + + // Verify that the group 4 is now named as 3. + $this->assertRaw('Group 3', 'Group 3 still exists.'); + + // Remove the group 3 again. + $this->drupalPostForm(NULL, [], t('Remove group 3')); + + // Group 3 now does not exist. + $this->assertNoRaw('Group 3', 'Group 3 has not been added yet.'); } }