In working on #2882729: In off-canvas block form hide Title input unless it will be displayed and change label to Block Title I figure out that ever we are calling \Drupal\FunctionalJavascriptTests\JSWebAssert::waitForElementVisible

We don't actually check if the element is returned.
So the current wait do give the element time to appear but they don't actually cause a failure if the element doesn't appear.

CommentFileSizeAuthor
#2 2883483-2.patch5.05 KBtedbow
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tedbow created an issue. See original summary.

tedbow’s picture

Created assertElementVisibleAfterWait() and replaced all calls to JSWebAssert::waitForElementVisible with it.

tedbow’s picture

Status: Active » Needs review
Wim Leers’s picture

Status: Needs review » Reviewed & tested by the community

Looks like an improvement! Strengthens test coverage, and reduces chance of mysterious test failures. What's not to like?

+++ b/core/modules/outside_in/tests/src/FunctionalJavascript/OutsideInJavascriptTestBase.php
@@ -140,4 +140,19 @@ protected function getTestThemes() {
+   * Assert the specified selector is visible after a wait.

Nit: s/Assert/Asserts/

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Nice clean-up. Fixed the nit on commit. (My fantastic collection of Drupal-related poetry is due out any day now...)

Committed and pushed to 8.4.x and cherry-picked to 8.3.x. Thanks!

  • webchick committed cb1a92c on 8.4.x
    Issue #2883483 by tedbow, Wim Leers: Assert that calls to...

  • webchick committed fe3649a on 8.3.x
    Issue #2883483 by tedbow, Wim Leers: Assert that calls to...

Status: Fixed » Closed (fixed)

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

tedbow’s picture

Component: outside_in.module » settings_tray.module

Changing to new settings_tray.module component. @drpal thanks for script help! :)