Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / contextual / tests / src / FunctionalJavascript / ContextualLinkClickTrait.php
index 2866e91cbf7debe18dacaa7d77f96a3fdd521909..2e90808996defd6f7b35099d583136298ba458c6 100644 (file)
@@ -18,6 +18,11 @@ trait ContextualLinkClickTrait {
    *   If true then the button will be forced to visible so it can be clicked.
    */
   protected function clickContextualLink($selector, $link_locator, $force_visible = TRUE) {
+    $page = $this->getSession()->getPage();
+    $page->waitFor(10, function () use ($page, $selector) {
+      return $page->find('css', "$selector .contextual-links");
+    });
+
     if ($force_visible) {
       $this->toggleContextualTriggerVisibility($selector);
     }