Loading core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php +9 −0 Original line number Diff line number Diff line Loading @@ -301,6 +301,7 @@ public function testUiAjaxException() { * Tests ajax focus handling. */ public function testAjaxFocus() { $this->markTestSkipped("Skipped due to frequent random test failures. See https://www.drupal.org/project/drupal/issues/3396536"); $this->drupalGet('/ajax_forms_test_get_form'); $this->assertNotNull($select = $this->assertSession()->elementExists('css', '#edit-select')); Loading @@ -326,6 +327,14 @@ public function testAjaxFocus() { $has_focus_id = $this->getSession()->evaluateScript('document.activeElement.id'); $this->assertEquals('edit-textfield-2', $has_focus_id); // Test textfield with 'change' event listener with refocus-blur set to // FALSE. $textfield2->setValue('Llamas say yarhar'); $textfield3->focus(); $this->assertSession()->assertWaitOnAjaxRequest(); $has_focus_id = $this->getSession()->evaluateScript('document.activeElement.id'); $this->assertEquals('edit-textfield-2', $has_focus_id); // Test textfield with 'change' event. $textfield3->focus(); $textfield3->setValue('Wasps buzz'); Loading Loading
core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php +9 −0 Original line number Diff line number Diff line Loading @@ -301,6 +301,7 @@ public function testUiAjaxException() { * Tests ajax focus handling. */ public function testAjaxFocus() { $this->markTestSkipped("Skipped due to frequent random test failures. See https://www.drupal.org/project/drupal/issues/3396536"); $this->drupalGet('/ajax_forms_test_get_form'); $this->assertNotNull($select = $this->assertSession()->elementExists('css', '#edit-select')); Loading @@ -326,6 +327,14 @@ public function testAjaxFocus() { $has_focus_id = $this->getSession()->evaluateScript('document.activeElement.id'); $this->assertEquals('edit-textfield-2', $has_focus_id); // Test textfield with 'change' event listener with refocus-blur set to // FALSE. $textfield2->setValue('Llamas say yarhar'); $textfield3->focus(); $this->assertSession()->assertWaitOnAjaxRequest(); $has_focus_id = $this->getSession()->evaluateScript('document.activeElement.id'); $this->assertEquals('edit-textfield-2', $has_focus_id); // Test textfield with 'change' event. $textfield3->focus(); $textfield3->setValue('Wasps buzz'); Loading