You are here

private function EntityBrowserContext::getItems in Lightning Media 8.3

Same name and namespace in other branches
  1. 8 tests/contexts/EntityBrowserContext.behat.inc \Acquia\LightningExtension\Context\EntityBrowserContext::getItems()
  2. 8.2 tests/contexts/EntityBrowserContext.behat.inc \Acquia\LightningExtension\Context\EntityBrowserContext::getItems()

Gets all items in an entity browser.

Parameters

string $browser_id: (optional) The entity browser ID.

Return value

\Behat\Mink\Element\NodeElement[] An array of items in the entity browser.

2 calls to EntityBrowserContext::getItems()
EntityBrowserContext::assertCount in tests/contexts/EntityBrowserContext.behat.inc
Asserts that a certain number of items are visible in the entity browser.
EntityBrowserContext::select in tests/contexts/EntityBrowserContext.behat.inc
Selects an item in an entity browser view.

File

tests/contexts/EntityBrowserContext.behat.inc, line 58

Class

EntityBrowserContext
Contains step definitions for interacting with entity browser instances.

Namespace

Acquia\LightningExtension\Context

Code

private function getItems($browser_id = NULL) {
  if ($browser_id) {
    $selector = 'form#entity-browser-' . Html::cleanCssIdentifier($browser_id) . '-form';
  }
  else {
    $selector = 'form[data-entity-browser-uuid]';
  }
  return $this
    ->assertSession()
    ->elementExists('css', $selector)
    ->findAll('css', '[data-selectable]');
}