Issue #2135101 by Gábor Hojtsy, stefank, YesCT: Fixed Expand test coverage on configuration translation tabs.

8.0.x
Alex Pott 2014-11-01 13:36:04 +00:00
parent 150893931e
commit c7dca6d1a6
1 changed files with 10 additions and 0 deletions

View File

@ -71,6 +71,7 @@ class ConfigTranslationUiTest extends WebTestBase {
'access site-wide contact form', 'access site-wide contact form',
'access contextual links', 'access contextual links',
'administer views', 'administer views',
'administer account settings',
) )
); );
// Create and login user. // Create and login user.
@ -251,12 +252,17 @@ class ConfigTranslationUiTest extends WebTestBase {
$translation_base_url = 'admin/structure/contact/manage/feedback/translate'; $translation_base_url = 'admin/structure/contact/manage/feedback/translate';
$this->assertLinkByHref($translation_base_url); $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 form')));
// Visit the form to confirm the changes. // Visit the form to confirm the changes.
$this->drupalGet('contact/feedback'); $this->drupalGet('contact/feedback');
$this->assertText($label); $this->assertText($label);
foreach ($this->langcodes as $langcode) { foreach ($this->langcodes as $langcode) {
$this->drupalGet($translation_base_url); $this->drupalGet($translation_base_url);
$this->assertLink(t('Translate @type', array('@type' => 'contact form')));
// 'Add' link should be present for $langcode translation. // 'Add' link should be present for $langcode translation.
$translation_page_url = "$translation_base_url/$langcode/add"; $translation_page_url = "$translation_base_url/$langcode/add";
@ -429,7 +435,11 @@ class ConfigTranslationUiTest extends WebTestBase {
public function testAccountSettingsConfigurationTranslation() { public function testAccountSettingsConfigurationTranslation() {
$this->drupalLogin($this->admin_user); $this->drupalLogin($this->admin_user);
$this->drupalGet('admin/config/people/accounts');
$this->assertLink(t('Translate @type', array('@type' => 'account settings')));
$this->drupalGet('admin/config/people/accounts/translate'); $this->drupalGet('admin/config/people/accounts/translate');
$this->assertLink(t('Translate @type', array('@type' => 'account settings')));
$this->assertLinkByHref('admin/config/people/accounts/translate/fr/add'); $this->assertLinkByHref('admin/config/people/accounts/translate/fr/add');
// Update account settings fields for French. // Update account settings fields for French.