You are here

protected function ImageFieldFormatterTest::assignNameToCkeditorIframe in Entity Embed 8

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

See also

\Behat\Mink\Session::switchToIFrame()

1 call to ImageFieldFormatterTest::assignNameToCkeditorIframe()
ImageFieldFormatterTest::testInvalidImageError in tests/src/FunctionalJavascript/ImageFieldFormatterTest.php
Test invalid image error.

File

tests/src/FunctionalJavascript/ImageFieldFormatterTest.php, line 261

Class

ImageFieldFormatterTest
Tests ckeditor integration.

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);
}