function MediaTest::openMetadataDialog

Clicks the `Edit media` button and waits for the metadata dialog.

This method assumes that the calling code has already switched into the CKEditor iframe.

2 calls to MediaTest::openMetadataDialog()
MediaTest::fillFieldInMetadataDialogAndSubmit in core/modules/ckeditor/tests/src/FunctionalJavascript/MediaTest.php
Fills in a field in the metadata dialog for an embedded media item.
MediaTest::testAlt in core/modules/ckeditor/tests/src/FunctionalJavascript/MediaTest.php
Tests the EditorMediaDialog can set the alt attribute.

File

core/modules/ckeditor/tests/src/FunctionalJavascript/MediaTest.php, line 1387

Class

MediaTest
@coversDefaultClass \Drupal\ckeditor\Plugin\CKEditorPlugin\DrupalMedia @group ckeditor @group legacy

Namespace

Drupal\Tests\ckeditor\FunctionalJavascript

Code

protected function openMetadataDialog() {
    $this->assertNotEmpty($embedded_media = $this->assertSession()
        ->waitForElementVisible('css', 'drupal-media'));
    $embedded_media->pressButton('Edit media');
    $this->waitForMetadataDialog();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.