You are here

protected function CKEditorIntegrationTest::assignNameToCkeditorPanelIframe in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php \Drupal\Tests\media\FunctionalJavascript\CKEditorIntegrationTest::assignNameToCkeditorPanelIframe()

Assigns a name to the CKEditor context menu iframe.

Note that this iframe doesn't appear until context menu appears.

See also

\Behat\Mink\Session::switchToIFrame()

1 call to CKEditorIntegrationTest::assignNameToCkeditorPanelIframe()
CKEditorIntegrationTest::testLinkability in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Tests linkability of the CKEditor widget.

File

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

Class

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

Namespace

Drupal\Tests\media\FunctionalJavascript

Code

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