Mercurial > hg > isophonics-drupal-site
comparison core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinkClickTrait.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
15:e200cb7efeb3 | 16:c2387f117808 |
---|---|
16 * The link id, title, or text. | 16 * The link id, title, or text. |
17 * @param bool $force_visible | 17 * @param bool $force_visible |
18 * If true then the button will be forced to visible so it can be clicked. | 18 * If true then the button will be forced to visible so it can be clicked. |
19 */ | 19 */ |
20 protected function clickContextualLink($selector, $link_locator, $force_visible = TRUE) { | 20 protected function clickContextualLink($selector, $link_locator, $force_visible = TRUE) { |
21 $page = $this->getSession()->getPage(); | |
22 $page->waitFor(10, function () use ($page, $selector) { | |
23 return $page->find('css', "$selector .contextual-links"); | |
24 }); | |
25 | |
21 if ($force_visible) { | 26 if ($force_visible) { |
22 $this->toggleContextualTriggerVisibility($selector); | 27 $this->toggleContextualTriggerVisibility($selector); |
23 } | 28 } |
24 | 29 |
25 $element = $this->getSession()->getPage()->find('css', $selector); | 30 $element = $this->getSession()->getPage()->find('css', $selector); |