You are here

public function BambooTwigTestBase::assertElementPresent in Bamboo Twig 8.3

Same name and namespace in other branches
  1. 8.5 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertElementPresent()
  2. 8 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertElementPresent()
  3. 8.2 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertElementPresent()
  4. 8.4 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertElementPresent()

Asserts that the element with the given CSS selector is present.

Parameters

string $css_selector: The CSS selector identifying the element to check.

Throws

Behat\Mink\Exception\ElementHtmlException When the condition is not fulfilled.

Overrides AssertLegacyTrait::assertElementPresent

See also

\Behat\Mink\WebAssert::elementExists

27 calls to BambooTwigTestBase::assertElementPresent()
BambooTwigConfigTest::testGetConfig in tests/src/Functional/BambooTwigConfigTest.php
@covers Drupal\bamboo_twig_config\TwigExtension\Config::getConfig
BambooTwigConfigTest::testGetSettings in tests/src/Functional/BambooTwigConfigTest.php
@covers Drupal\bamboo_twig_config\TwigExtension\Config::getSettings
BambooTwigConfigTest::testGetState in tests/src/Functional/BambooTwigConfigTest.php
@covers Drupal\bamboo_twig_config\TwigExtension\Config::getState
BambooTwigExtensionsTest::testArrayShuffle in tests/src/Functional/BambooTwigExtensionsTest.php
Cover the \Twig_Extensions_Extension_Array::twig_shuffle_filter.
BambooTwigExtensionsTest::testTextTruncate in tests/src/Functional/BambooTwigExtensionsTest.php
Cover the \Twig_Extensions_Extension_Text::twig_truncate_filter.

... See full list

File

tests/src/Functional/BambooTwigTestBase.php, line 58

Class

BambooTwigTestBase
Has some additional helper methods to make test code more readable.

Namespace

Drupal\Tests\bamboo_twig\Functional

Code

public function assertElementPresent($css_selector) {
  $this
    ->assertSession()
    ->elementExists('css', $css_selector);
}