Problem/Motivation
Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderUiTest
fail: [Other] Line 0 of sites/default/files/simpletest/phpunit-107.xml:
PHPUnit Test failed to complete; Error: PHPUnit 9.5.28 by Sebastian Bergmann and contributors.
Testing Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderUiTest
F.S. 4 / 4 (100%)
Time: 00:32.271, Memory: 4.00 MB
There was 1 failure:
1) Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderUiTest::testReloadWithNoSections
Error: cannot call methods on dialog prior to initialization; attempted to call method 'widget'
at Function.error (http://php-apache-jenkins-drupal8-core-regression-tests-79911/subdirectory/core/assets/vendor/jquery/jquery.min.js?v=3.6.3:2:2616)
at HTMLDivElement. (http://php-apache-jenkins-drupal8-core-regression-tests-79911/subdirectory/core/assets/vendor/jquery.ui/ui/widget-min.js?v=10.1.0-dev:9:2224)
at Function.each (http://php-apache-jenkins-drupal8-core-regression-tests-79911/subdirectory/core/assets/vendor/jquery/jquery.min.js?v=3.6.3:2:3003)
at E.fn.init.each (http://php-apache-jenkins-drupal8-core-regression-tests-79911/subdirectory/core/assets/vendor/jquery/jquery.min.js?v=3.6.3:2:1481)
at t.fn. [as dialog] (http://php-apache-jenkins-drupal8-core-regression-tests-79911/subdirectory/core/assets/vendor/jquery.ui/ui/widget-min.js?v=10.1.0-dev:9:1962)
at Object.getContainer (http://php-apache-jenkins-drupal8-core-regression-tests-79911/subdirectory/core/misc/dialog/off-canvas/js/off-canvas.js?v=10.1.0-dev:302:23)
at resetSize (http://php-apache-jenkins-drupal8-core-regression-tests-79911/subdirectory/core/misc/dialog/off-canvas/js/off-canvas.js?v=10.1.0-dev:207:42)
at later (http://php-apache-jenkins-drupal8-core-regression-tests-79911/subdirectory/core/misc/debounce.js?v=10.1.0-dev:37:23)
/var/www/html/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php:133
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
https://www.drupal.org/pift-ci-job/2629306
https://www.drupal.org/pift-ci-job/2628845
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 3350972-9.4_9.5-16.patch | 1.28 KB | spokje |
Comments
Comment #2
nod_Not sure yet why exactly but it seems to be a timing issue, attached patch should fix it.
Comment #3
spokjeThe patch showing that
LayoutBuilderUiTesthas random fails is here: #2856047-65: Avoid random failures in JavascriptTestBase when testing functionality in a dialog.No idea how this works, but
core-3350972-2.patchshows that it _does_ work.RTBC for me,
core-3350972-2-full-suite.patchis the patch to commit.Comment #6
lauriiiI got some helpful context from @nod_ on Slack:
It sound like this a bug that at least @larowlan had hit. @nod_ explained that this is expected behavior for
Drupal.debounce, and that the problem is about the usage of it.Committed 8ea9e1c and pushed to 10.1.x. Also backported to 10.0.x. Thanks!
Comment #7
nod_Comment #10
xjmI also backported this to 9.5.x and 9.4.x since it interferes with the security advisory development process.
Comment #11
xjmComment #14
xjmWhoopsidaisy, JS needs to be rebuilt for the D9 backports. Fail was: https://www.drupal.org/pift-ci-job/2639435
Comment #15
xjmComment #16
spokjeComment #17
xjmThis is actually critical; updating metadata.
Comment #20
xjmAlso given the above criticality, I committed the backport straight from NR. Thanks @Spokje!
Comment #22
meanderix commentedDoes this also fix #3075236: jQuery UI dialog modals repositions incorrectly on window resize when there is a off canvas rendered?
Comment #23
bwaindwain commentedI think this may have caused a bug with browser resizing. See https://www.drupal.org/project/drupal/issues/3359465