diff -u b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php --- b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php @@ -54,16 +54,16 @@ $this->assertTrue($create_new_filter_group->isVisible(), 'Add group link found.'); $create_new_filter_group->click(); + // Assert the existence of the new filter group by checking the remove group + // link. + $remove_link = $assert_session->waitForLink('Remove group'); + $this->assertTrue($remove_link->isVisible(), 'New group found.'); + // The call to assertWaitOnAjaxRequest is required in this case because this // will make the test wait on the additional javascript files loaded in the // triggered ajax call. $assert_session->assertWaitOnAjaxRequest(); - // Assert the existence of the new filter group by checking the remove group - // link. - $remove_link = $page->findLink('Remove group'); - $this->assertTrue($remove_link->isVisible(), 'New group found.'); - // Remove the group again and assert the group is not present anymore. $remove_link->click();