public function ThunderEntityBrowserTestTrait::openEntityBrowser in Thunder 6.1.x
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ThunderEntityBrowserTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderEntityBrowserTestTrait::openEntityBrowser()
- 8.2 tests/src/FunctionalJavascript/ThunderEntityBrowserTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderEntityBrowserTestTrait::openEntityBrowser()
- 8.3 tests/src/FunctionalJavascript/ThunderEntityBrowserTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderEntityBrowserTestTrait::openEntityBrowser()
- 8.4 tests/src/FunctionalJavascript/ThunderEntityBrowserTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderEntityBrowserTestTrait::openEntityBrowser()
- 6.2.x tests/src/FunctionalJavascript/ThunderEntityBrowserTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderEntityBrowserTestTrait::openEntityBrowser()
- 6.0.x tests/src/FunctionalJavascript/ThunderEntityBrowserTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderEntityBrowserTestTrait::openEntityBrowser()
Open modal entity browser and switch into iframe from it.
Parameters
\Behat\Mink\Element\DocumentElement $page: Current active page.
string $drupalSelector: Drupal selector.
string $entityBrowser: Entity browser name.
2 calls to ThunderEntityBrowserTestTrait::openEntityBrowser()
- MediaGalleryModifyTest::testAddRemove in tests/
src/ FunctionalJavascript/ MediaGalleryModifyTest.php - Test add/remove Images in Gallery.
- MediaImageModifyTest::testRemoveAdd in tests/
src/ FunctionalJavascript/ MediaImageModifyTest.php - Test add/remove image in image paragraph.
File
- tests/
src/ FunctionalJavascript/ ThunderEntityBrowserTestTrait.php, line 25
Class
- ThunderEntityBrowserTestTrait
- Trait with support for handling Entity Browser actions.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
public function openEntityBrowser(DocumentElement $page, $drupalSelector, $entityBrowser) {
$this
->clickButtonDrupalSelector($page, $drupalSelector);
$this
->getSession()
->switchToIFrame('entity_browser_iframe_' . $entityBrowser);
// Wait that iframe is loaded and jQuery is available.
$this
->getSession()
->wait(10000, '(typeof jQuery !== "undefined")');
$this
->assertSession()
->assertWaitOnAjaxRequest();
}