You are here

public function VarbaseContext::theMediaBrowserIsOpen in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 9.0.x

Same name and namespace in other branches
  1. 8.8 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::theMediaBrowserIsOpen()
  2. 8.7 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::theMediaBrowserIsOpen()

Check if the media browser with the selected iframe id is open.

Varbase Context #varbase.

Example #1: Then the "editor_media_browser" media browser should be open Example #2: And the "multiple_image_browser" media browser should be open

@Then /^the "([^"]*)" media browser should be open$/

File

tests/features/bootstrap/VarbaseContext.php, line 1549

Class

VarbaseContext
Defines application features from the specific context.

Code

public function theMediaBrowserIsOpen($entityBrowserIframeId) {
  if (!$this
    ->getSession()
    ->getPage()
    ->find('css', '.ui-dialog.ui-widget-content')) {
    throw new \Exception('The media browser failed to open.');
  }
  if (!$this
    ->getSession()
    ->getPage()
    ->find('css', "#{$entityBrowserIframeId}")) {
    throw new \Exception("{$entityBrowserIframeId} is not found.");
  }
}