You are here

protected function EntityBrowserWebDriverTestBase::assertCheckboxExistsByValue in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 tests/src/FunctionalJavascript/EntityBrowserWebDriverTestBase.php \Drupal\Tests\entity_browser\FunctionalJavascript\EntityBrowserWebDriverTestBase::assertCheckboxExistsByValue()

Checks that a specific checkbox input element exists on the current page.

Parameters

string $value: The string value of the radio element.

Return value

\Behat\Mink\Element\NodeElement The radio input form element.

Throws

\Behat\Mink\Exception\ElementNotFoundException

1 call to EntityBrowserWebDriverTestBase::assertCheckboxExistsByValue()
CardinalityTest::testEntityReferenceWidget in tests/src/FunctionalJavascript/CardinalityTest.php
Tests Entity Reference widget.

File

tests/src/FunctionalJavascript/EntityBrowserWebDriverTestBase.php, line 281

Class

EntityBrowserWebDriverTestBase
Base class for Entity browser Javascript functional tests.

Namespace

Drupal\Tests\entity_browser\FunctionalJavascript

Code

protected function assertCheckboxExistsByValue($value) {
  $value = (string) $value;
  return $this
    ->assertSession()
    ->elementExists('xpath', "//input[contains(@type, 'checkbox') and contains(@value, '" . $value . "')]");
}