function ConfigSourceListTest::testFieldConfigList

Test for field configuration translation from source list.

File

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

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
    ->submitForm([
    'items[field.field.node.article.body]' => TRUE,
  ], 'Request translation');
  $this
    ->assertSession()
    ->pageTextContains('One job needs to be checked out.');
  $this
    ->submitForm([], 'Submit to provider');

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