public function LingotekUserSettingsBulkTranslationTest::testAddingLanguageAllowsRequesting in Lingotek Translation 8
Tests that a config can be translated using the links on the management page.
File
- src/
Tests/ LingotekUserSettingsBulkTranslationTest.php, line 269
Class
- LingotekUserSettingsBulkTranslationTest
- Tests translating user settings using the bulk management form.
Namespace
Drupal\lingotek\TestsCode
public function testAddingLanguageAllowsRequesting() {
// We need a node with translations first.
$this
->testUserSettingsTranslationUsingLinks();
// Add a language.
ConfigurableLanguage::createFromLangcode('ca')
->save();
// Go to the bulk config management page.
$this
->goToConfigBulkManagementForm();
$basepath = \Drupal::request()
->getBasePath();
// There is a link for requesting the Catalan translation.
$this
->assertLinkByHref($basepath . '/admin/lingotek/config/request/entity.user.admin_form/entity.user.admin_form/ca_ES?destination=' . $basepath . '/admin/lingotek/config/manage');
$this
->clickLink('CA');
$this
->assertText("Translation to ca_ES requested successfully");
}