'Heading 6',
],
$available_headings);
} /**
* Test for plugin Language of parts.
*/
public function testLanguageOfPartsPlugin() { $page =
$this->
getSession()->
getPage();
$assert_session =
$this->
assertSession();
$this->
createNewTextFormat($page,
$assert_session);
// Press arrow down key to add the button to the active toolbar.
$this->
assertNotEmpty($assert_session->
waitForElement('css', '.ckeditor5-toolbar-item-textPartLanguage'
));
$this->
triggerKeyUp('.ckeditor5-toolbar-item-textPartLanguage', 'ArrowDown'
);
$assert_session->
assertWaitOnAjaxRequest();
// The CKEditor 5 module should warn that `<span>` cannot be created.
$assert_session->
waitForElement('css', '[role=alert][data-drupal-message-type="warning"]:contains("The Language plugin needs another plugin to create <span>, for it to be able to create the following attributes: <span lang dir>. Enable a plugin that supports creating this tag. If none exists, you can configure the Source Editing plugin to support it.")'
);
// Make `<span>` creatable.
$this->
assertNotEmpty($assert_session->
elementExists('css', '.ckeditor5-toolbar-item-sourceEditing'
));
$this->
triggerKeyUp('.ckeditor5-toolbar-item-sourceEditing', 'ArrowDown'
);