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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
959 bytes

Status: Needs review » Needs work

The last submitted patch, 2: 3239436-2.patch, failed testing. View results

alexpott’s picture

Status: Needs work » Needs review
FileSize
866 bytes
977 bytes
danflanagan8’s picture

Status: Needs review » Reviewed & tested by the community

The 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 in Drupal\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.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

@danflanagan8 great catch. Let's fix that too

alexpott’s picture

Status: Needs work » Needs review
FileSize
2.96 KB
2.89 KB
longwave’s picture

Status: Needs review » Reviewed & tested by the community

I looked for all other instances of catch in FunctionalJavascript tests but none of the remainder suffer from this problem.

  • catch committed 4b6a3ab on 9.3.x
    Issue #3239436 by alexpott, danflanagan8, longwave: Cannot run \Drupal\...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed 4b6a3ab and pushed to 9.3.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.