You are here

public function ContentTranslationStandardFieldsTest::testFieldTranslatableArticle in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/content_translation/src/Tests/ContentTranslationStandardFieldsTest.php \Drupal\content_translation\Tests\ContentTranslationStandardFieldsTest::testFieldTranslatableArticle()

Tests that translatable fields are being rendered.

File

core/modules/content_translation/src/Tests/ContentTranslationStandardFieldsTest.php, line 60
Contains \Drupal\content_translation\Tests\ContentTranslationStandardFieldsTest.

Class

ContentTranslationStandardFieldsTest
Tests the Content translation settings using the standard profile.

Namespace

Drupal\content_translation\Tests

Code

public function testFieldTranslatableArticle() {
  $path = 'admin/config/regional/content-language';
  $this
    ->drupalGet($path);

  // Check content block fields.
  $this
    ->assertFieldByXPath("//input[@id='edit-settings-block-content-basic-fields-body' and @checked='checked']");

  // Check comment fields.
  $this
    ->assertFieldByXPath("//input[@id='edit-settings-comment-comment-fields-comment-body' and @checked='checked']");

  // Check node fields.
  $this
    ->assertFieldByXPath("//input[@id='edit-settings-node-article-fields-comment' and @checked='checked']");
  $this
    ->assertFieldByXPath("//input[@id='edit-settings-node-article-fields-field-image' and @checked='checked']");
  $this
    ->assertFieldByXPath("//input[@id='edit-settings-node-article-fields-field-tags' and @checked='checked']");

  // Check user fields.
  $this
    ->assertFieldByXPath("//input[@id='edit-settings-user-user-fields-user-picture' and @checked='checked']");
}