function CKEditorIntegrationTest::openMetadataDialogWithKeyPress

Focuses on `Edit media` button and presses the given key.

Parameters

int $char: The character code to press.

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

2 calls to CKEditorIntegrationTest::openMetadataDialogWithKeyPress()
CKEditorIntegrationTest::testAlt in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Tests the EditorMediaDialog can set the alt attribute.
CKEditorIntegrationTest::testEditableCaption in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Tests caption editing in the CKEditor widget.

File

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

Class

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

Namespace

Drupal\Tests\media\FunctionalJavascript

Code

protected function openMetadataDialogWithKeyPress($char) {
    $this->assertNotEmpty($button = $this->assertSession()
        ->waitForButton('Edit media'));
    $button->keyDown($char);
    $this->waitForMetadataDialog();
}

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