You are here

private function EntityEmbedTrait::waitForImageEmbedForm in Lightning Media 8.3

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

Waits for an image-based entity embed form to appear.

Return value

\Behat\Mink\Element\NodeElement The entity embed form.

2 calls to EntityEmbedTrait::waitForImageEmbedForm()
CKEditorMediaBrowserTest::testImageEmbed in tests/src/FunctionalJavascript/CKEditorMediaBrowserTest.php
Tests that the image embed plugin is used to embed an image.
EmbeddedMediaTest::testEmbedImageMedia in tests/src/FunctionalJavascript/EmbeddedMediaTest.php
Tests embedding image media with custom alt and title text.

File

tests/src/Traits/EntityEmbedTrait.php, line 30

Class

EntityEmbedTrait
Contains helper methods for interacting with Entity Embed.

Namespace

Drupal\Tests\lightning_media\Traits

Code

private function waitForImageEmbedForm() {
  $assert_session = $this
    ->assertSession();
  $embed_form = $this
    ->waitForEmbedForm();
  $assert_session
    ->selectExists('Image style', $embed_form);
  $assert_session
    ->fieldExists('Alternate text', $embed_form);
  $assert_session
    ->fieldExists('Title', $embed_form);
  return $embed_form;
}