public function CKEditorStylesComboTranslationTest::testExistingFormat in Drupal 8
Same name and namespace in other branches
- 9 core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboTranslationTest.php \Drupal\Tests\ckeditor\Functional\CKEditorStylesComboTranslationTest::testExistingFormat()
Tests translations of CKEditor styles configuration.
File
- core/
modules/ ckeditor/ tests/ src/ Functional/ CKEditorStylesComboTranslationTest.php, line 71
Class
- CKEditorStylesComboTranslationTest
- Tests administration of the CKEditor StylesCombo plugin.
Namespace
Drupal\Tests\ckeditor\FunctionalCode
public function testExistingFormat() {
$this
->drupalLogin($this->adminUser);
$edit = [
'editor[settings][plugins][stylescombo][styles]' => 'h1.title|Title',
];
$this
->drupalPostForm('admin/config/content/formats/manage/' . $this->format, $edit, 'Save configuration');
$this
->drupalGet('admin/config/content/formats/manage/' . $this->format . '/translate/de/add');
$this
->assertEquals('textarea', $this
->assertSession()
->fieldExists('List of styles')
->getTagName());
$this
->assertSession()
->fieldValueEquals('List of styles', 'h1.title|Title');
$page = $this
->getSession()
->getPage();
$page
->fillField('List of styles', 'h1.title|Titel');
$page
->pressButton('Save translation');
$this
->assertSession()
->pageTextContains('Successfully saved German translation.');
}