You are here

public function ThunderJavascriptTestBase::fillCkEditor in Thunder 6.0.x

Same name and namespace in other branches
  1. 8.5 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::fillCkEditor()
  2. 8.2 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::fillCkEditor()
  3. 8.3 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::fillCkEditor()
  4. 8.4 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::fillCkEditor()
  5. 6.2.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::fillCkEditor()
  6. 6.1.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::fillCkEditor()

Fill CKEditor field.

Parameters

string $ckEditorCssSelector: CSS selector for CKEditor.

string $text: Text that will be filled into CKEditor.

3 calls to ThunderJavascriptTestBase::fillCkEditor()
LiveblogTest::liveblogSetBody in tests/src/FunctionalJavascript/Integration/LiveblogTest.php
Set the body of a liveblog post.
MediaImageModifyTest::testImageEdit in tests/src/FunctionalJavascript/MediaImageModifyTest.php
Test Image modifications (edit fields).
ParagraphSplitTest::testAddParagraphAfterSplitDataLoss in tests/src/FunctionalJavascript/Integration/ParagraphSplitTest.php
Test if a adding paragraph after split leads to data loss.

File

tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php, line 291

Class

ThunderJavascriptTestBase
Base class for Thunder Javascript functional tests.

Namespace

Drupal\Tests\thunder\FunctionalJavascript

Code

public function fillCkEditor($ckEditorCssSelector, $text) {
  $ckEditorId = $this
    ->getCkEditorId($ckEditorCssSelector);
  $this
    ->getSession()
    ->getDriver()
    ->executeScript("CKEDITOR.instances[\"{$ckEditorId}\"].insertHtml(\"{$text}\");");
}