You are here

protected function MultiStepSelectionDisplayTest::clickViewEntity in Entity Browser 8

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

Click on entity in view to be selected.

Parameters

string $entityId: Entity ID that will be selected. Format: "file:1".

1 call to MultiStepSelectionDisplayTest::clickViewEntity()
MultiStepSelectionDisplayTest::testAjaxCommands in tests/src/FunctionalJavascript/MultiStepSelectionDisplayTest.php
Check that selection state in entity browser Inline Entity Form.

File

tests/src/FunctionalJavascript/MultiStepSelectionDisplayTest.php, line 41

Class

MultiStepSelectionDisplayTest
Test for multi_step_display selection display.

Namespace

Drupal\Tests\entity_browser\FunctionalJavascript

Code

protected function clickViewEntity($entityId) {
  $xpathViewRow = '//*[./*[contains(@class, "views-field-entity-browser-select") and .//input[@name="entity_browser_select[' . $entityId . ']"]]]';
  $this
    ->assertSession()
    ->elementExists('xpath', $xpathViewRow)
    ->press();
}