function CKEditorIntegrationTest::leaveSourceMode

Leaves source mode and returns to the CKEditor iframe.

2 calls to CKEditorIntegrationTest::leaveSourceMode()
CKEditorIntegrationTest::testAlignment in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Tests alignment integration.
CKEditorIntegrationTest::testAlt in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Tests the EditorMediaDialog can set the alt attribute.

File

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

Class

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

Namespace

Drupal\Tests\media\FunctionalJavascript

Code

protected function leaveSourceMode() {
    // Press the source button again to leave source mode.
    $this->pressEditorButton('source');
    // Having entered source mode means we need to reassign an ID to the
    // CKEditor iframe.
    $this->assignNameToCkeditorIframe();
    $this->getSession()
        ->switchToIFrame('ckeditor');
}

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