Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Testing Drupal\Tests\ckeditor5\FunctionalJavascript\ImageTest
...........E....... 19 / 19 (100%)
Time: 11:43.216, Memory: 4.00 MB
There was 1 error:
1) Drupal\Tests\ckeditor5\FunctionalJavascript\ImageTest::testAltTextRequired with data set "Unrestricted" (true)
Behat\Mink\Exception\ElementNotFoundException: Element matching css ".ck-balloon-panel_visible .ck-balloon-rotator__content > .ck.ck-text-alternative-form" not found.
/var/www/html/vendor/behat/mink/src/WebAssert.php:418
/var/www/html/core/tests/Drupal/Tests/WebAssert.php:892
/var/www/html/core/modules/ckeditor5/tests/src/Traits/CKEditor5TestTrait.php:116
/var/www/html/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php:440
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:726
in https://www.drupal.org/pift-ci-job/2507415
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#9 | interdiff-8-9.txt | 528 bytes | nod_ |
#9 | core-3317330-9.patch | 2.15 KB | nod_ |
| |||
#8 | 3317330-8.patch | 2.74 KB | Wim Leers |
| |||
#8 | interdiff.txt | 2.15 KB | Wim Leers |
#6 | 3317330-6.patch | 605 bytes | Wim Leers |
Comments
Comment #2
Wim LeersComment #3
Wim LeersI keep forgetting that
core/drupalci.yml
drives not PHPUnit, butcore/scripts/run-tests.sh
😬Comment #4
Wim Leers… despite
in the docs 🤷♀️
Created #3317504: run-tests.sh claims to support running a particular test method, but does not for that…
Comment #5
Wim LeersAlright, so instead of running only the one randomly failing test method, due to lacking infrastructure we'll just have to run all of them 🫥
Comment #6
Wim LeersComment #8
Wim LeersReproduced locally.
This is a race condition caused by
The first uploads an image using
\Behat\Mink\Element\NodeElement::attachFile()
but doesn't wait for the upload to complete, instead it waits for.ck-widget.image
… but this is the THIRD image, so it always matches instantaneously.core/modules/ckeditor5/js/ckeditor5_plugins/drupalImage/src/imageupload/drupalimageuploadadapter.js
uses an AJAX request, we should wait for that … except that it doesn't use the AJAX system. Fortunately, there are other things we can wait for 👍Comment #9
nod_Very nice find
Comment #10
catchCommitted/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x, thanks!
Comment #12
catch