function TMGMTUiJavascriptTest::testCheckoutForm

Javascript test for the checkout form.

File

tests/src/FunctionalJavascript/TMGMTUiJavascriptTest.php, line 499

Class

TMGMTUiJavascriptTest
Verifies the UI of the review form.

Namespace

Drupal\Tests\tmgmt\FunctionalJavascript

Code

function testCheckoutForm() {

  // Test for job checkout form, if the target language is supported,
  // the test translator should say it is supported.
  $job = tmgmt_job_create('en', 'de', 0);
  $job
    ->save();
  $page = $this
    ->getSession()
    ->getPage();
  $assert_session = $this
    ->assertSession();
  $this
    ->drupalGet('admin/tmgmt/jobs/' . $job
    ->id());
  $page
    ->selectFieldOption('Target language', 'de');
  $this
    ->assertEquals('Test provider', $assert_session
    ->optionExists('translator', 'test_translator')
    ->getText());
}