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
https://www.drupal.org/pift-ci-job/849736
Drupal\Tests\system\FunctionalJavascript\ThemeFormSettingsTest::testFormSettingsSubmissionHandler with data set "test theme.theme" ('test_theme_theme')
Failed asserting that false is true.
Proposed resolution
Check if it just unstable work from $page->pressButton();
, because we already have very similar case in #2924201: Resolve random failure in LayoutBuilderTest so that it can be added to HEAD
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#15 | interdiff-12-15.txt | 803 bytes | Anonymous (not verified) |
#15 | 2934064-15-web-drive.patch | 1.91 KB | Anonymous (not verified) |
#14 | assertWaitOnClick.patch | 3.08 KB | Anonymous (not verified) |
| |||
#12 | interdiff-11-12.txt | 745 bytes | Anonymous (not verified) |
#12 | 2934064-12-test-only.patch | 1.75 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedvaplas created an issue. See original summary.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #3
Anonymous (not verified) CreditAttribution: Anonymous commented#2: bad patches, sorry.
And yep, with current patch i catch random fail even localy (after 100-500 circles). So this is definitely a flaw in the
pressButton()
method.Edit:
Yep, Mr. Bot also confirmed it:
https://dispatcher.drupalci.org/job/drupal_patches/42607/console
https://dispatcher.drupalci.org/job/drupal_patches/42609/console
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedEdit: Detected random fail in
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedEdit: finally met the time limit :)
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedTest fix from #2934997-27: Intermittent failure in MediaUiJavascriptTest.
Comment #9
benjifisher@vaplas:
I am not sure what you are trying to do here. In the patch from #8, I see this:
Based on the results from #2934997: Intermittent failure in MediaUiJavascriptTest, I would expect that to fail (intermittently). If you want to test the fix from that issue, then you need something like this:
That is: after pressing the button, wait for the status message to appear and then assert that the text is on the page.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commented@benjifisher, thank you for review and hint. Let's check #9.
Also my test is terribly clogging the disk place, because of logging all pages. So, replaced it with manual recording in problem cases.
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commented#9: @benjifisher, wow! Looks like your hint works! (And my attempt to eliminate logging, no. Try again.)
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commented#11: Now without logs. Ok. Here is #6 version without logs too. In order to ensure that without waiting we still have a random fail.
Comment #13
tim.plunkettThis is coupling the test to Classy theme :\
Comment #14
Anonymous (not verified) CreditAttribution: Anonymous commented#13: Indeed. But the message does not even always appear after clicking/pressing (
pressButton()
,press()
,clickLink()
,click()
). So we can not use this sign for all cases.We have issue #2936122: Find out why JavscriptTestBase occasionally needs a waitForElement on a normal page load for to investigate this problem. Until we find the cause, we can provide a spec
assertion
for this cases. ExampleassertWaitOnClick
(likeassertWaitOnAjaxRequest
).Or wait JSB enhancements (maybe the problem will go away by itself):
Comment #15
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #16
Anonymous (not verified) CreditAttribution: Anonymous commented#2775653: JavascriptTests with webDriver Rocks! All runs in #15 are green (just some of them lacked a time limit) 🎉
Comment #17
Anonymous (not verified) CreditAttribution: Anonymous commentedClosed in favor of #2936122: Find out why JavscriptTestBase occasionally needs a waitForElement on a normal page load. Thanks to everyone who participated here!