function CKEditor5Test::languageOfPartsPluginConfigureLanguageListHelper
Same name in other branches
- 11.x core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php \Drupal\Tests\ckeditor5\FunctionalJavascript\CKEditor5Test::languageOfPartsPluginConfigureLanguageListHelper()
Helper to set language list option for CKEditor.
1 call to CKEditor5Test::languageOfPartsPluginConfigureLanguageListHelper()
- CKEditor5Test::testLanguageOfPartsPlugin in core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ CKEditor5Test.php - Test for Language of Parts plugin.
File
-
core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ CKEditor5Test.php, line 223
Class
- CKEditor5Test
- Tests for CKEditor 5.
Namespace
Drupal\Tests\ckeditor5\FunctionalJavascriptCode
public function languageOfPartsPluginConfigureLanguageListHelper($page, $assert_session, $option) {
$this->drupalGet('admin/config/content/formats/manage/ckeditor5');
$this->assertNotEmpty($assert_session->waitForElement('css', 'a[href^="#edit-editor-settings-plugins-ckeditor5-language"]'));
// Set correct value.
$vertical_tab_link = $page->find('xpath', "//ul[contains(@class, 'vertical-tabs__menu')]/li/a[starts-with(@href, '#edit-editor-settings-plugins-ckeditor5-language')]");
$vertical_tab_link->click();
$select = $page->findField('editor[settings][plugins][ckeditor5_language][language_list]');
if ($select->getValue() !== $option) {
$select->selectOption($option);
$assert_session->assertWaitOnAjaxRequest();
}
$page->pressButton('Save configuration');
$assert_session->responseContains('The text format <em class="placeholder">ckeditor5</em> has been updated.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.