You are here

protected function CKEditorIntegrationTest::waitForMetadataDialog in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php \Drupal\Tests\media\FunctionalJavascript\CKEditorIntegrationTest::waitForMetadataDialog()

Waits for the form that allows editing metadata.

See also

\Drupal\media\Form\EditorMediaDialog

5 calls to CKEditorIntegrationTest::waitForMetadataDialog()
CKEditorIntegrationTest::openMetadataDialog in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Clicks the `Edit media` button and waits for the metadata dialog.
CKEditorIntegrationTest::openMetadataDialogWithKeyPress in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Focuses on `Edit media` button and presses the given key.
CKEditorIntegrationTest::testDialogAccess in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Tests the EditorMediaDialog's form elements' #access logic.
CKEditorIntegrationTest::testTranslationAlt in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Tests that dialog loads appropriate translation's alt text.
CKEditorIntegrationTest::testViewMode in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Tests the EditorMediaDialog can set the data-view-mode attribute.

File

core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php, line 1337

Class

CKEditorIntegrationTest
@coversDefaultClass \Drupal\media\Plugin\CKEditorPlugin\DrupalMedia @group media

Namespace

Drupal\Tests\media\FunctionalJavascript

Code

protected function waitForMetadataDialog() {
  $page = $this
    ->getSession()
    ->getPage();
  $this
    ->getSession()
    ->switchToIFrame();

  // Wait for the dialog to open.
  $result = $page
    ->waitFor(10, function ($page) {
    $metadata_editor = $page
      ->find('css', 'form.editor-media-dialog');
    return !empty($metadata_editor);
  });
  $this
    ->assertTrue($result);
}