function CKEditor5CKEditor4Compatibility::testCkeCompatibility

Ensures that CKEditor 5 and CKEditor 4 can be used on the same page.

File

core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditor5CKEditor4Compatibility.php, line 128

Class

CKEditor5CKEditor4Compatibility
Ensures that CKEditor 5 can be used on the same page with CKEditor 4.

Namespace

Drupal\Tests\ckeditor\FunctionalJavascript

Code

public function testCkeCompatibility() {
    $page = $this->getSession()
        ->getPage();
    $assert_session = $this->assertSession();
    $this->drupalGet('node/add/page');
    $page->selectFieldOption('field_text_ckeditor4[0][format]', 'test_format_for_ckeditor4');
    $page->selectFieldOption('field_text_ckeditor5[0][format]', 'test_format_for_ckeditor5');
    $this->assertNotEmpty($assert_session->waitForElement('css', '.cke_wysiwyg_frame'));
    $this->assertNotEmpty($assert_session->waitForElement('css', '.ck-editor'));
}

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