- š¬š§United Kingdom catch
Are there any other tests that can use this? I think this might have been what dawehner was getting at in #31.
- Status changed to Needs work
over 1 year ago 4:26pm 14 March 2023 - š³š±Netherlands Lendude Amsterdam
I think a dedicated test for this trait/JS is what was asked for. Sounds like a good addition, currently if we were to remove the Views test, this functionality has no coverage.
- šŗšøUnited States smustgrave
Do you have an example of testing a trait?
- Status changed to Needs review
over 1 year ago 11:31pm 17 March 2023 - Status changed to RTBC
over 1 year ago 1:49pm 24 March 2023 - š³š±Netherlands Lendude Amsterdam
Nice, that looks great.
Code looks good, we are only updating 1 test here, should we do more here of should we open a follow-up to change more tests to use this?
I think landing this first is good, so marking RTBC, not making the follow up yet till others agree that would be the right way to handle this. - š¬š§United Kingdom catch
Doing more in a follow-up seems good to me.
- š³š±Netherlands Lendude Amsterdam
Ok, here is that follow up š Convert all JavaScript tests that use dialogs to use waitForDialog() Active
The last submitted patch, 51: 2856047-51.patch, failed testing. View results ā
- Status changed to Needs work
over 1 year ago 1:19am 30 March 2023 - šŗšøUnited States bnjmnm Ann Arbor, MI
Since this introduces changes intended to reduce random fails, this should have patches that customize drupalci.yml ā to run a single random-fail prone test several hundred times (possibly as many times as the test runner time limit allows). Include a version with and without the changes introduced here to compare the failure rate.
I also noticed that the solution here resembles something already in core specific to off canvas. Most of the lifting is done in these files:
https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/modules/sys...
https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/modules/sys...Perhaps the changes here can be integrated the off canvas ones, even if it's just having the traits in the same dir/namespace?
- š³š±Netherlands spokje
Since this introduces changes intended to reduce random fails, this should have patches that customize drupalci.yml to run a single random-fail prone test several hundred times (possibly as many times as the test runner time limit allows). Include a version with and without the changes introduced here to compare the failure rate.
Adding both those here, before we start work on (possible) integrating with the off canvas solution.
- š³š±Netherlands spokje
So what we've learned here is that
FilterCriteriaTest
is not broken (enough) to make any difference.Not saying the approach in the patch for dialogs is wrong, just that it can't be tested with
FilterCriteriaTest
- š¬š§United Kingdom catch
MediaLibraryTest::testButton() is a recently skipped random failure that checks for a dialog, so that might be a good one to try.
- š³š±Netherlands spokje
Sadly also this one doesn't seem broken enough to be used for any proof.
- š¬š§United Kingdom catch
Maybe LayoutBuilderUiTest - just seen it come up:
.Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderUiTest ā 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:36.411, 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-drupal-
https://www.drupal.org/pift-ci-job/2634951 ā
If we can't get it to fail out of 1500 runs, it suggests the recent instability of all these tests might not be related to the changes in this patch though.
- š³š±Netherlands spokje
If we can't get it to fail out of 1500 runs, it suggests the recent instability of all these tests might not be related to the changes in this patch though.
Even more: If we can't get
MediaLibraryTest::testButton()
to fail once in 1500 times when run on it's own, I fear it looks like the failure there has to do with concurrent running other tests? - š§šŖBelgium herved
Perhaps a lead on how to reproduce this reliably: screen resolution seems to affect it a lot.
We have a huge suite of behat (selenium chromium) tests on a project at work. I wanted to change the resolution (from 1600x1200 to 1600x900) and noticed a lot of failures with modals. Traced it to the debounce (20ms) in Drupal.dialog.resetSize causing dialogs to bounce 2-3 times. The modal appears, selenium attempts to scroll in the modal to click on a link inside, but the modal repositions again before it can scroll and throws a "move target out of bounds" error because the links is out of reach. (what a nightmare to debug).
I simply reverted to 1600x1200 for now, the modal seems more stable, way less repositioning for some reason. - š§šŖBelgium herved
Does š Error: cannot call methods on dialog prior to initialization; attempted to call method 'option' Needs review solve this?