Problem/Motivation
It's impossible to work on \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderDisableInteractionsTest locally because it fails with the latest chromedriver. This because it expects is not clickable at point to be in an exception message whereas what you get is:
1) Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderDisableInteractionsTest::testFormsLinksDisabled
Failed asserting that 'element not interactable: element has zero size\n
(Session info: chrome=93.0.4577.82)\n
(Driver info: chromedriver=92.0.4515.107 (87a818b10553a07434ea9e2b6dccf3cbe7895134-refs/branch-heads/4515@{#1634}),platform=Mac OS X 10.15.7 x86_64)' contains "is not clickable at point".
/Users/alex/dev/sites/drupal8alt.dev/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:119
/Users/alex/dev/sites/drupal8alt.dev/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:55
/Users/alex/dev/sites/drupal8alt.dev/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php:184
/Users/alex/dev/sites/drupal8alt.dev/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php:201
/Users/alex/dev/sites/drupal8alt.dev/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php:119
/Users/alex/dev/sites/drupal8alt.dev/vendor/phpunit/phpunit/src/Framework/TestResult.php:703
This is a major bug because this test is very hard to work with locally.
Steps to reproduce
Run the test with a modern chromedriver.
Proposed resolution
Loosen the assertion to support the other exception message of remove the assertion completely.
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
N/a
Comments
Comment #2
alexpottThis makes working on #3208791: [random test failure] Random fail in LayoutBuilderDisableInteractionsTest for example.
Comment #4
alexpottComment #5
danflanagan8The patch looks good, @catch. The regex will match the old message and the new message.
I also did a search of "not clickable" in core and found a very similar looking assertion that may also break in the newest chromedriver. This is in
Drupal\Tests\layout_builder\FunctionalJavascript\BlockFormMessagesTest::clickElementWhenClickable(), which is called a number of times inDrupal\Tests\layout_builder\FunctionalJavascript\BlockFormMessagesTest:strstr($exception->getMessage(), 'not clickable') === FALSE)Would you want to check that test too and knock it now if it needs to be fixed?
Let me know. I'll RTBC this in the meantime. If you want to make another update I'll happily review.
Comment #6
alexpott@danflanagan8 great catch. Let's fix that too
Comment #7
alexpottComment #8
longwaveI looked for all other instances of
catchin FunctionalJavascript tests but none of the remainder suffer from this problem.Comment #10
catchCommitted 4b6a3ab and pushed to 9.3.x. Thanks!