You are here

protected function LayoutBuilderDisableInteractionsTest::movePointerTo in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderDisableInteractionsTest::movePointerTo()

Moves mouse pointer to location of $selector.

Parameters

string $selector: CSS selector.

1 call to LayoutBuilderDisableInteractionsTest::movePointerTo()
LayoutBuilderDisableInteractionsTest::assertContextualLinkRetainsMouseup in core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php
Makes sure contextual links respond to mouseup event.

File

core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php, line 304

Class

LayoutBuilderDisableInteractionsTest
Tests the Layout Builder disables interactions of rendered blocks.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

protected function movePointerTo($selector) {
  $driver_session = $this
    ->getSession()
    ->getDriver()
    ->getWebDriverSession();
  $element = $driver_session
    ->element('css selector', $selector);
  $driver_session
    ->moveto([
    'element' => $element
      ->getID(),
  ]);
}