You are here

function ConfigSourceListTest::testFieldConfigList in Translation Management Tool 8

Test for field configuration translation from source list.

File

sources/tmgmt_config/tests/src/Functional/ConfigSourceListTest.php, line 331

Class

ConfigSourceListTest
Tests the user interface for entity translation lists.

Namespace

Drupal\Tests\tmgmt_config\Functional

Code

function testFieldConfigList() {
  $this
    ->drupalGet('admin/tmgmt/sources/config/field_config');

  // Test submission.
  $this
    ->drupalPostForm(NULL, array(
    'items[field.field.node.article.body]' => TRUE,
  ), t('Request translation'));
  $this
    ->assertText(t('One job needs to be checked out.'));
  $this
    ->drupalPostForm(NULL, array(), t('Submit to provider'));

  // Make sure that we're back on the originally defined destination URL.
  $this
    ->assertUrl('admin/tmgmt/sources/config/field_config');
  $this
    ->assertText(t('Test translation created.'));
  $this
    ->assertText(t('The translation of Body  to German is finished and can now be reviewed.'));
}