diff --git a/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php b/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php index dfda109..89c4b5d 100644 --- a/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php +++ b/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php @@ -259,12 +259,17 @@ class ConfigTranslationUiTest extends WebTestBase { $translation_base_url = 'admin/structure/contact/manage/feedback/translate'; $this->assertLinkByHref($translation_base_url); + // Make sure translate tab is present. + $this->drupalGet('admin/structure/contact/manage/feedback'); + $this->assertLink(t('Translate @type', array('@type' => 'contact category'))); + // Visit the form to confirm the changes. $this->drupalGet('contact/feedback'); $this->assertText($label); foreach ($this->langcodes as $langcode) { $this->drupalGet($translation_base_url); + $this->assertLink(t('Translate @type', array('@type' => 'contact category'))); // 'Add' link should be present for $langcode translation. $translation_page_url = "$translation_base_url/$langcode/add"; @@ -273,6 +278,7 @@ class ConfigTranslationUiTest extends WebTestBase { // Make sure original text is present on this page. $this->drupalGet($translation_page_url); $this->assertText($label); + $this->assertLink(t('Translate @type', array('@type' => 'contact category'))); // Update translatable fields. $edit = array( @@ -336,6 +342,7 @@ class ConfigTranslationUiTest extends WebTestBase { $replacements = array('%label' => t('!label !entity_type', array('!label' => $label, '!entity_type' => Unicode::strtolower(t('Contact category')))), '@language' => language_load($langcode)->name); $this->drupalGet("$translation_base_url/$langcode/delete"); + $this->assertLink(t('Translate @type', array('@type' => 'contact category'))); $this->assertRaw(t('Are you sure you want to delete the @language translation of %label?', $replacements)); // Assert link back to list page to cancel delete is present. $this->assertLinkByHref($translation_base_url); @@ -438,7 +445,11 @@ class ConfigTranslationUiTest extends WebTestBase { public function testAccountSettingsConfigurationTranslation() { $this->drupalLogin($this->admin_user); + $this->drupalGet('admin/config/people/accounts'); + $this->assertLink(t('Translate @type', array('@type' => 'settings'))); + $this->drupalGet('admin/config/people/accounts/translate'); + $this->assertLink(t('Translate @type', array('@type' => 'settings'))); $this->assertLinkByHref('admin/config/people/accounts/translate/fr/add'); // Update account settings fields for French. @@ -452,6 +463,7 @@ class ConfigTranslationUiTest extends WebTestBase { // Make sure the changes are saved and loaded back properly. $this->drupalGet('admin/config/people/accounts/translate/fr/edit'); + $this->assertLink(t('Translate @type', array('@type' => 'settings'))); foreach ($edit as $key => $value) { // Check the translations appear in the right field type as well. $xpath = '//' . (strpos($key, '.body') ? 'textarea' : 'input') . '[@name="'. $key . '"]';