protected function ContextualLinkClickTrait::toggleContextualTriggerVisibility in Drupal 8
Same name and namespace in other branches
- 9 core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinkClickTrait.php \Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait::toggleContextualTriggerVisibility()
- 10 core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinkClickTrait.php \Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait::toggleContextualTriggerVisibility()
Toggles the visibility of a contextual trigger.
Parameters
string $selector: The selector for the element that contains the contextual link.
6 calls to ContextualLinkClickTrait::toggleContextualTriggerVisibility()
- ContextualLinkClickTrait::clickContextualLink in core/
modules/ contextual/ tests/ src/ FunctionalJavascript/ ContextualLinkClickTrait.php - Clicks a contextual link.
- ContextualLinksTest::testRevisionContextualLinks in core/
modules/ node/ tests/ src/ FunctionalJavascript/ ContextualLinksTest.php - Tests the contextual links on revisions.
- LayoutBuilderDisableInteractionsTest::assertContextualLinkRetainsMouseup in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ LayoutBuilderDisableInteractionsTest.php - Makes sure contextual links respond to mouseup event.
- LayoutBuilderTest::clickContextualLink in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ LayoutBuilderTest.php - @todo Remove this in https://www.drupal.org/project/drupal/issues/2918718.
- LayoutBuilderUiTest::testAddHighlights in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ LayoutBuilderUiTest.php - Tests that elements that open the dialog are properly highlighted.
File
- core/
modules/ contextual/ tests/ src/ FunctionalJavascript/ ContextualLinkClickTrait.php, line 45
Class
- ContextualLinkClickTrait
- Functions for testing contextual links.
Namespace
Drupal\Tests\contextual\FunctionalJavascriptCode
protected function toggleContextualTriggerVisibility($selector) {
// Hovering over the element itself with should be enough, but does not
// work. Manually remove the visually-hidden class.
$this
->getSession()
->executeScript("jQuery('{$selector} .contextual .trigger').toggleClass('visually-hidden');");
}