You are here

public function PageManagerConfigTranslationTest::testTranslation in Page Manager 8

Tests config translation.

File

src/Tests/PageManagerConfigTranslationTest.php, line 50
Contains \Drupal\page_manager\Tests\PageManagerConfigTranslationTest.

Class

PageManagerConfigTranslationTest
Tests that pages and variants can be translated.

Namespace

Drupal\page_manager\Tests

Code

public function testTranslation() {
  $this
    ->drupalGet('admin/config/regional/config-translation');
  $this
    ->assertLinkByHref('admin/config/regional/config-translation/page');
  $this
    ->assertLinkByHref('admin/config/regional/config-translation/page_variant');
  $this
    ->drupalGet('admin/config/regional/config-translation/page');
  $this
    ->assertText('Node view');
  $this
    ->clickLink('Translate');
  $this
    ->clickLink('Add');
  $this
    ->assertField('translation[config_names][page_manager.page.node_view][label]');
  $this
    ->drupalGet('admin/config/regional/config-translation/page_variant');
  $this
    ->assertText('HTTP status code');
  $this
    ->clickLink('Translate');
  $this
    ->clickLink('Add');
  $this
    ->assertField('translation[config_names][page_manager.page_variant.http_status_code][label]');
}