diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php index 2d2b6b4..4a804b6 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php @@ -128,8 +128,9 @@ protected function setUp() { public function testSiteInformationTranslationUi() { $this->drupalLogin($this->adminUser); - $site_name = 'Site name for testing configuration translation'; + $site_name = 'Name of the site for testing configuration translation'; $site_slogan = 'Site slogan for testing configuration translation'; + $site_name_label = 'Site name'; $fr_site_name = 'Nom du site pour tester la configuration traduction'; $fr_site_slogan = 'Slogan du site pour tester la traduction de configuration'; $fr_site_name_label = 'Libellé du champ "Nom du site"'; @@ -193,7 +194,7 @@ public function testSiteInformationTranslationUi() { // Translate 'Site name' label in French $search = array( - 'string' => 'Site name', + 'string' => $site_name_label, 'langcode' => 'fr', 'translation' => 'untranslated', ); @@ -206,10 +207,16 @@ public function testSiteInformationTranslationUi() { ); $this->drupalPostForm('admin/config/regional/translate', $edit, t('Save translations')); - - // Ensure that the label is translated in French + // Ensure that the label is in French (and not in English) $this->drupalGet("fr/$translation_base_url/fr/edit"); - $this->assertText($fr_site_name_label, "The label '$fr_site_name_label' was not found"); + $this->assertText($fr_site_name_label); + $this->assertNoText($site_name_label); + + // Ensure that the label is also in French (and not in English) + // when editing another language with the interface in French + $this->drupalGet("fr/$translation_base_url/ta/edit"); + $this->assertText($fr_site_name_label); + $this->assertNoText($site_name_label); } /**