You are here

public function ConfigTranslationOverviewTest::testHiddenEntities in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationOverviewTest::testHiddenEntities()
  2. 9 core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationOverviewTest::testHiddenEntities()

Tests availability of hidden entities in the translation overview.

File

core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php, line 136

Class

ConfigTranslationOverviewTest
Translate settings and entities to various languages.

Namespace

Drupal\Tests\config_translation\Functional

Code

public function testHiddenEntities() {

  // Hidden languages are only available to translate through the
  // configuration translation listings.
  $this
    ->drupalGet('admin/config/regional/config-translation/configurable_language');
  $this
    ->assertSession()
    ->pageTextContains('Not applicable');
  $this
    ->assertSession()
    ->linkByHrefExists('admin/config/regional/language/edit/zxx/translate');
  $this
    ->assertSession()
    ->pageTextContains('Not specified');
  $this
    ->assertSession()
    ->linkByHrefExists('admin/config/regional/language/edit/und/translate');

  // Hidden date formats are only available to translate through the
  // configuration translation listings. Test a couple of them.
  $this
    ->drupalGet('admin/config/regional/config-translation/date_format');
  $this
    ->assertSession()
    ->pageTextContains('HTML Date');
  $this
    ->assertSession()
    ->linkByHrefExists('admin/config/regional/date-time/formats/manage/html_date/translate');
  $this
    ->assertSession()
    ->pageTextContains('HTML Year');
  $this
    ->assertSession()
    ->linkByHrefExists('admin/config/regional/date-time/formats/manage/html_year/translate');
}