diff -u b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php --- b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php @@ -55,7 +55,7 @@ // Wait for the DOM to update. The HtmlCommand will update // #ajax_selected_color to reflect the color change. - $green_span = $this->assertSession()->waitForElement('css', "#ajax_selected_color span:contains('green')"); + $green_span = $this->assertSession()->waitForElement('css', "#ajax_selected_color:contains('green')"); $this->assertNotNull($green_span, 'DOM update: The selected color SPAN is green.'); // Confirm the operation of the UpdateBuildIdCommand. @@ -67,7 +67,7 @@ $session->getPage()->selectFieldOption('select', 'red'); // Wait for the DOM to update. - $red_span = $this->assertSession()->waitForElement('css', "#ajax_selected_color span:contains('red')"); + $red_span = $this->assertSession()->waitForElement('css', "#ajax_selected_color:contains('red')"); $this->assertNotNull($red_span, 'DOM update: The selected color SPAN is red.'); // Confirm the operation of the UpdateBuildIdCommand. @@ -86,7 +86,7 @@ $session->getPage()->selectFieldOption('select', 'green'); // Wait for the DOM to update. - $green_span2 = $this->assertSession()->waitForElement('css', "#ajax_selected_color span:contains('green')"); + $green_span2 = $this->assertSession()->waitForElement('css', "#ajax_selected_color:contains('green')"); $this->assertNotNull($green_span2, 'DOM update: After reload - the selected color SPAN is green.'); $build_id_from_cache_first_ajax = $this->getFormBuildId(); @@ -98,7 +98,7 @@ $session->getPage()->selectFieldOption('select', 'red'); // Wait for the DOM to update. - $red_span2 = $this->assertSession()->waitForElement('css', "#ajax_selected_color span:contains('red')"); + $red_span2 = $this->assertSession()->waitForElement('css', "#ajax_selected_color:contains('red')"); $this->assertNotNull($red_span2, 'DOM update: After reload - the selected color SPAN is red.'); $build_id_from_cache_second_ajax = $this->getFormBuildId();