You are here

protected function IntegrationTestBase::assertVisible in Search API Autocomplete 8

Asserts that the specified element exists and is visible.

Parameters

string $selector_type: The element selector type (CSS, XPath).

string|array $selector: The element selector. Note: the first found element is used.

Throws

\Behat\Mink\Exception\ElementNotFoundException Thrown if the element doesn't exist.

1 call to IntegrationTestBase::assertVisible()
IntegrationTest::configureSearch in tests/src/FunctionalJavascript/IntegrationTest.php
Configures the test search via the UI.

File

tests/src/FunctionalJavascript/IntegrationTestBase.php, line 144

Class

IntegrationTestBase
Provides a base class for integration tests of this module.

Namespace

Drupal\Tests\search_api_autocomplete\FunctionalJavascript

Code

protected function assertVisible($selector_type, $selector) {
  $element = $this
    ->assertSession()
    ->elementExists($selector_type, $selector);
  $this
    ->assertTrue($element
    ->isVisible(), "Element should be visible but isn't.");
}