You are here

public function LingotekJobManagementTests::testJobTranslationContentTab in Lingotek Translation 3.4.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::testJobTranslationContentTab()
  2. 4.0.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::testJobTranslationContentTab()
  3. 3.0.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::testJobTranslationContentTab()
  4. 3.1.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::testJobTranslationContentTab()
  5. 3.2.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::testJobTranslationContentTab()
  6. 3.3.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::testJobTranslationContentTab()
  7. 3.5.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::testJobTranslationContentTab()
  8. 3.6.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::testJobTranslationContentTab()
  9. 3.7.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::testJobTranslationContentTab()
  10. 3.8.x tests/src/Functional/LingotekJobManagementTests.php \Drupal\Tests\lingotek\Functional\LingotekJobManagementTests::testJobTranslationContentTab()
1 call to LingotekJobManagementTests::testJobTranslationContentTab()
LingotekJobManagementTests::testJobTranslationContentTabHasOwnFilter in tests/src/Functional/LingotekJobManagementTests.php

File

tests/src/Functional/LingotekJobManagementTests.php, line 138

Class

LingotekJobManagementTests
Tests job management listings.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testJobTranslationContentTab() {
  $assert_session = $this
    ->assertSession();
  $this
    ->createContent();
  $this
    ->drupalGet('/admin/lingotek/job/my-test-job-id-1');

  // Assert tabs.
  $assert_session
    ->linkExists('Job my-test-job-id-1 Content');
  $assert_session
    ->linkExists('Job my-test-job-id-1 Config');

  // Assert title block heading.
  $this
    ->assertSame('Job my-test-job-id-1 Content', $this
    ->xpath('//h1')[0]
    ->getText());

  // Assert content listed.
  $assert_session
    ->linkExists('Llamas are cool');
  $this
    ->assertSourceStatus('en', Lingotek::STATUS_IMPORTING);
  $this
    ->assertTargetStatus('es', Lingotek::STATUS_REQUEST);
  $this
    ->assertTargetStatus('es-ar', Lingotek::STATUS_REQUEST);
  $assert_session
    ->linkExists('Camelid');
  $assert_session
    ->linkExists('Herbivorous');
  $assert_session
    ->linkNotExists('Awesome');

  // Assert the fields are not there.
  $this
    ->assertNoField('show_advanced');
  $this
    ->assertNoField('job_id');
}