You are here

protected function LingotekSystemSiteBulkCancelTest::createAndTranslateSystemSiteWithLinks in Lingotek Translation 3.2.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/LingotekSystemSiteBulkCancelTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkCancelTest::createAndTranslateSystemSiteWithLinks()
  2. 4.0.x tests/src/Functional/LingotekSystemSiteBulkCancelTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkCancelTest::createAndTranslateSystemSiteWithLinks()
  3. 3.0.x tests/src/Functional/LingotekSystemSiteBulkCancelTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkCancelTest::createAndTranslateSystemSiteWithLinks()
  4. 3.1.x tests/src/Functional/LingotekSystemSiteBulkCancelTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkCancelTest::createAndTranslateSystemSiteWithLinks()
  5. 3.3.x tests/src/Functional/LingotekSystemSiteBulkCancelTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkCancelTest::createAndTranslateSystemSiteWithLinks()
  6. 3.4.x tests/src/Functional/LingotekSystemSiteBulkCancelTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkCancelTest::createAndTranslateSystemSiteWithLinks()
  7. 3.5.x tests/src/Functional/LingotekSystemSiteBulkCancelTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkCancelTest::createAndTranslateSystemSiteWithLinks()
  8. 3.6.x tests/src/Functional/LingotekSystemSiteBulkCancelTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkCancelTest::createAndTranslateSystemSiteWithLinks()
  9. 3.7.x tests/src/Functional/LingotekSystemSiteBulkCancelTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkCancelTest::createAndTranslateSystemSiteWithLinks()
  10. 3.8.x tests/src/Functional/LingotekSystemSiteBulkCancelTest.php \Drupal\Tests\lingotek\Functional\LingotekSystemSiteBulkCancelTest::createAndTranslateSystemSiteWithLinks()
2 calls to LingotekSystemSiteBulkCancelTest::createAndTranslateSystemSiteWithLinks()
LingotekSystemSiteBulkCancelTest::testSystemSiteCancellation in tests/src/Functional/LingotekSystemSiteBulkCancelTest.php
Tests that a config entity can be cancelled using the bulk operations on the management page.
LingotekSystemSiteBulkCancelTest::testSystemSiteCancelTarget in tests/src/Functional/LingotekSystemSiteBulkCancelTest.php
Tests that a config target can be cancelled using the bulk operations on the management page.

File

tests/src/Functional/LingotekSystemSiteBulkCancelTest.php, line 130

Class

LingotekSystemSiteBulkCancelTest
Tests translating config using the bulk management form.

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function createAndTranslateSystemSiteWithLinks() {
  $assert_session = $this
    ->assertSession();

  // Go to the bulk config management page.
  $this
    ->goToConfigBulkManagementForm();
  $basepath = \Drupal::request()
    ->getBasePath();
  $assert_session
    ->linkByHrefExists($basepath . '/admin/lingotek/config/upload/system.site_information_settings/system.site_information_settings?destination=' . $basepath . '/admin/lingotek/config/manage');

  // Clicking English must init the upload of content.
  $this
    ->clickLink('EN', 1);
  $this
    ->assertText(t('System information uploaded successfully'));

  // There is a link for checking status.
  $this
    ->clickLink('EN', 1);
  $this
    ->assertText('System information status checked successfully');
  $assert_session
    ->linkByHrefExists($basepath . '/admin/lingotek/config/request/system.site_information_settings/system.site_information_settings/es_ES?destination=' . $basepath . '/admin/lingotek/config/manage');

  // Request the Spanish translation.
  $this
    ->clickLink('ES');
  $this
    ->assertText("Translation to es_ES requested successfully");

  // Check status of the Spanish translation.
  $this
    ->clickLink('ES');
  $this
    ->assertText("Translation to es_ES checked successfully");

  // Download the Spanish translation.
  $this
    ->clickLink('ES');
  $this
    ->assertText('Translation to es_ES downloaded successfully');
}