You are here

protected function EntityEmbedTestBase::assignNameToCkeditorIframe in Entity Embed 8

Assigns a name to the CKEditor iframe, to allow use of ::switchToIFrame().

See also

\Behat\Mink\Session::switchToIFrame()

8 calls to EntityEmbedTestBase::assignNameToCkeditorIframe()
CKEditorIntegrationTest::testIntegration in tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Test integration with Filter, Editor and Ckeditor.
ContentTranslationTest::testHostEntityLangcode in tests/src/FunctionalJavascript/ContentTranslationTest.php
Tests the host entity's langcode is available in EntityEmbedDialog.
MediaImageTest::testAltAndTitle in tests/src/FunctionalJavascript/MediaImageTest.php
Tests alt and title overriding for embedded images.
MediaImageTest::testCkeditorWidgetHasEditableCaption in tests/src/FunctionalJavascript/MediaImageTest.php
Tests caption editing in the CKEditor widget.
MediaImageTest::testCkeditorWidgetIsLinkable in tests/src/FunctionalJavascript/MediaImageTest.php
Tests linkability of the CKEditor widget.

... See full list

File

tests/src/FunctionalJavascript/EntityEmbedTestBase.php, line 32

Class

EntityEmbedTestBase
Base class for all entity_embed tests.

Namespace

Drupal\Tests\entity_embed\FunctionalJavascript

Code

protected function assignNameToCkeditorIframe() {
  $javascript = <<<JS
(function(){
  document.getElementsByClassName('cke_wysiwyg_frame')[0].id = 'ckeditor';
})()
JS;
  $this
    ->getSession()
    ->evaluateScript($javascript);
}