You are here

private function EntityBrowserTrait::waitForEntityBrowserToClose in Lightning Media 8.3

Same name and namespace in other branches
  1. 8.4 tests/src/Traits/EntityBrowserTrait.php \Drupal\Tests\lightning_media\Traits\EntityBrowserTrait::waitForEntityBrowserToClose()

Waits for the current entity browser frame to close.

Parameters

string $id: (optional) The machine name of the entity browser whose frame we are in. Defaults to the value of $this->currentEntityBrowser.

7 calls to EntityBrowserTrait::waitForEntityBrowserToClose()
CKEditorMediaBrowserTest::testEditEmbed in tests/src/FunctionalJavascript/CKEditorMediaBrowserTest.php
Tests that the entity embed dialog opens when editing a pre-existing embed.
EmbeddedMediaTest::testEmbedCodeBasedEmbeddedMedia in tests/src/FunctionalJavascript/EmbeddedMediaTest.php
Tests embedding embed code-based media, with no image options.
ImageBrowserCardinalityTest::testCardinality in modules/lightning_media_image/tests/src/FunctionalJavascript/ImageBrowserCardinalityTest.php
Tests that cardinality is enforced in the image browser.
ImageBrowserTest::testUpload in tests/src/FunctionalJavascript/ImageBrowserTest.php
Tests uploading an image in the image browser.
MediaBrowserWidgetDisambiguationTest::testEmbed in tests/src/FunctionalJavascript/MediaBrowserWidgetDisambiguationTest.php
Tests that select is shown when media bundle is ambiguous.

... See full list

File

tests/src/Traits/EntityBrowserTrait.php, line 59

Class

EntityBrowserTrait
Contains methods for interacting with entity browsers in frames.

Namespace

Drupal\Tests\lightning_media\Traits

Code

private function waitForEntityBrowserToClose($id = NULL) {
  $id = $id ?: $this->currentEntityBrowser;
  $this
    ->assertNotEmpty($id);
  $this
    ->getSession()
    ->switchToIFrame(NULL);
  $this
    ->assertJsCondition("typeof window.entity_browser_iframe_{$id} === 'undefined'");
}