You are here

protected function WebformAssertLegacyTrait::assertElementPresent in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Traits/WebformAssertLegacyTrait.php \Drupal\Tests\webform\Traits\WebformAssertLegacyTrait::assertElementPresent()

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

Parameters

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

1 call to WebformAssertLegacyTrait::assertElementPresent()
WebformVariantApplyTest::testVariantApply in tests/src/Functional/Variant/WebformVariantApplyTest.php
Test variant apply.

File

tests/src/Traits/WebformAssertLegacyTrait.php, line 84

Class

WebformAssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\Tests\webform\Traits

Code

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