class ImageBrowserContext in Lightning Media 8
Same name and namespace in other branches
- 8.2 tests/contexts/ImageBrowserContext.behat.inc \Acquia\LightningExtension\Context\ImageBrowserContext
- 8.3 tests/contexts/ImageBrowserContext.behat.inc \Acquia\LightningExtension\Context\ImageBrowserContext
Hierarchy
- class \Acquia\LightningExtension\Context\ImageBrowserContext extends \Drupal\DrupalExtension\Context\DrupalSubContextBase uses \Acquia\LightningExtension\Context\AwaitTrait
Expanded class hierarchy of ImageBrowserContext
File
- tests/
contexts/ ImageBrowserContext.behat.inc, line 7
Namespace
Acquia\LightningExtension\ContextView source
class ImageBrowserContext extends DrupalSubContextBase {
use AwaitTrait;
/**
* Opens an image browser for a particular field.
*
* @param string $field
* The field label.
*
* @When I open the :field image browser
*/
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');
// This might be vestigial.
sleep(10);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ImageBrowserContext:: |
public | function | Opens an image browser for a particular field. |