You are here

public function LingotekConfigEntityBulkProfileTest::testChangeTranslationProfileBulkAfterCancelling in Lingotek Translation 8.2

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

Tests that the translation profiles can be updated with the bulk actions after cancelling.

File

tests/src/Functional/LingotekConfigEntityBulkProfileTest.php, line 108

Class

LingotekConfigEntityBulkProfileTest
Tests changing a profile using the bulk management form.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testChangeTranslationProfileBulkAfterCancelling() {

  // Login as admin.
  $this
    ->drupalLogin($this->rootUser);

  // Go to the bulk config management page.
  $this
    ->goToConfigBulkManagementForm('node_type');
  $basepath = \Drupal::request()
    ->getBasePath();
  $edit = [
    'table[article]' => TRUE,
    $this
      ->getBulkOperationFormName() => $this
      ->getBulkOperationNameForCancel('node'),
  ];
  $this
    ->drupalPostForm(NULL, $edit, $this
    ->getApplyActionsButtonLabel());
  $edit = [
    'table[article]' => TRUE,
    $this
      ->getBulkOperationFormName() => 'change_profile:automatic',
  ];
  $this
    ->drupalPostForm(NULL, $edit, $this
    ->getApplyActionsButtonLabel());

  // Check that there are three nodes with the Automatic Profile
  $automatic_profile = $this
    ->xpath("//td[contains(text(), 'Automatic')]");
  $this
    ->assertEqual(count($automatic_profile), 1, 'Automatic Profile set');
}