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.ymldrives 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.jsuses 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