diff -u b/core/modules/image/tests/src/FunctionalJavascript/QuickEditImageTest.php b/core/modules/image/tests/src/FunctionalJavascript/QuickEditImageTest.php --- b/core/modules/image/tests/src/FunctionalJavascript/QuickEditImageTest.php +++ b/core/modules/image/tests/src/FunctionalJavascript/QuickEditImageTest.php @@ -148,9 +148,12 @@ . 'jQuery(".quickedit-image-dropzone").trigger(e);'; $this->getSession()->executeScript($script); + // Wait for AJAX to finish. + $this->assertSession()->assertWaitOnAjaxRequest(); + // Wait for the dropzone element to be removed (i.e. loading is done). $condition = "jQuery('" . $field_selector . " .quickedit-image-dropzone').length == 0"; - $this->assertJsCondition($condition, 20000); + $this->assertJsCondition($condition, 10000); // To prevent 403s on save, we re-set our request (cookie) state. $this->prepareRequest();