You are here

protected function DataCollectorTableTest::pressAjaxButton in Charts 5.0.x

Same name and namespace in other branches
  1. 8.4 tests/src/FunctionalJavascript/DataCollectorTableTest.php \Drupal\Tests\charts\FunctionalJavascript\DataCollectorTableTest::pressAjaxButton()

Press ajax button.

Parameters

string $selector: The selector.

1 call to DataCollectorTableTest::pressAjaxButton()
DataCollectorTableTest::doTableOperation in tests/src/FunctionalJavascript/DataCollectorTableTest.php
Do table operation.

File

tests/src/FunctionalJavascript/DataCollectorTableTest.php, line 222

Class

DataCollectorTableTest
Tests the data collector table element.

Namespace

Drupal\Tests\charts\FunctionalJavascript

Code

protected function pressAjaxButton($selector) {
  $button = $this
    ->getSession()
    ->getPage()
    ->find('css', $selector);
  $this
    ->getSession()
    ->executeScript("jQuery('" . $selector . "').trigger('mouseleave')");
  $button
    ->mouseOver();
  $button
    ->press();
}