protected function WebformBrowserTestTrait::assertCssSelect in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Traits/WebformBrowserTestTrait.php \Drupal\Tests\webform\Traits\WebformBrowserTestTrait::assertCssSelect()
Passes if the CSS selector IS found on the loaded page, fail otherwise.
35 calls to WebformBrowserTestTrait::assertCssSelect()
- WebformCardsAjaxJavaScriptTest::testAjax in modules/
webform_cards/ tests/ src/ FunctionalJavaScript/ WebformCardsAjaxJavaScriptTest.php - Test webform cards ajax.
- WebformCardsAutoForwardJavaScriptTest::testAutoForward in modules/
webform_cards/ tests/ src/ FunctionalJavaScript/ WebformCardsAutoForwardJavaScriptTest.php - Test webform cards auto-forward.
- WebformCardsProgressJavaScriptTest::testProgress in modules/
webform_cards/ tests/ src/ FunctionalJavaScript/ WebformCardsProgressJavaScriptTest.php - Test webform cards progress.
- WebformCardsStatesJavaScriptTest::testStates in modules/
webform_cards/ tests/ src/ FunctionalJavaScript/ WebformCardsStatesJavaScriptTest.php - Test webform cards states.
- WebformClientSideValidationJavaScriptTest::testClientSideValidation in modules/
webform_clientside_validation/ tests/ src/ FunctionalJavascript/ Validation/ WebformClientSideValidationJavaScriptTest.php - Tests custom states.
File
- tests/
src/ Traits/ WebformBrowserTestTrait.php, line 438
Class
- WebformBrowserTestTrait
- Provides convenience methods for webform assertions in browser tests.
Namespace
Drupal\Tests\webform\TraitsCode
protected function assertCssSelect($selector, $message = '') {
$element = $this
->cssSelect($selector);
if (!$message) {
$message = new FormattableMarkup('Found @selector', [
'@selector' => $selector,
]);
}
$this
->assertNotEmpty($element, $message);
}