You are here

public function ImageBrowserContext::open in Lightning Media 8.3

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

Opens an image browser for a particular field.

@When I open the :field image browser

Parameters

string $field: The field label.

File

tests/contexts/ImageBrowserContext.behat.inc, line 29

Class

ImageBrowserContext
Contains step definitions for interacting with Lightning's image browsers.

Namespace

Acquia\LightningExtension\Context

Code

public function open($field) {

  /** @var ElementContext $context */
  $context = $this
    ->getContext(ElementContext::class);
  $context
    ->assertDetails($field)
    ->pressButton('Select Image(s)');
  $this
    ->awaitAjax();
  $context
    ->enterFrame('entity_browser_iframe_image_browser');
}