You are here

protected function LingotekTargetActionsTest::filterVisibleElements in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 3.6.x tests/src/FunctionalJavascript/LingotekTargetActionsTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekTargetActionsTest::filterVisibleElements()
  2. 3.7.x tests/src/FunctionalJavascript/LingotekTargetActionsTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekTargetActionsTest::filterVisibleElements()
  3. 3.8.x tests/src/FunctionalJavascript/LingotekTargetActionsTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekTargetActionsTest::filterVisibleElements()

Removes any non-visible elements from the passed array.

Parameters

\Behat\Mink\Element\NodeElement[] $elements: An array of node elements.

Return value

\Behat\Mink\Element\NodeElement[]

3 calls to LingotekTargetActionsTest::filterVisibleElements()
LingotekTargetActionsTest::testDropdownTargetStatus in tests/src/FunctionalJavascript/LingotekTargetActionsTest.php
Tests that the supported locales are rendered.
LingotekTargetActionsTest::testDropdownTargetStatuses in tests/src/FunctionalJavascript/LingotekTargetActionsTest.php
Tests that the supported locales are rendered.
LingotekTargetActionsTest::waitForVisibleElementCount in tests/src/FunctionalJavascript/LingotekTargetActionsTest.php
Waits for the specified number of items to be visible.

File

tests/src/FunctionalJavascript/LingotekTargetActionsTest.php, line 134

Class

LingotekTargetActionsTest
@group lingotek

Namespace

Drupal\Tests\lingotek\FunctionalJavascript

Code

protected function filterVisibleElements(array $elements) {
  $elements = array_filter($elements, function (NodeElement $element) {
    return $element
      ->isVisible();
  });
  return $elements;
}