You are here

public function ConfigTranslationViewListUiTest::testTranslateOperationInViewListUi in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/config_translation/src/Tests/ConfigTranslationViewListUiTest.php \Drupal\config_translation\Tests\ConfigTranslationViewListUiTest::testTranslateOperationInViewListUi()

Tests views_ui list to see if translate link is added to operations.

File

core/modules/config_translation/src/Tests/ConfigTranslationViewListUiTest.php, line 48
Contains \Drupal\config_translation\Tests\ConfigTranslationViewListUiTest.

Class

ConfigTranslationViewListUiTest
Visit view list and test if translate is available.

Namespace

Drupal\config_translation\Tests

Code

public function testTranslateOperationInViewListUi() {

  // Views UI List 'admin/structure/views'.
  $this
    ->drupalGet('admin/structure/views');
  $translate_link = 'admin/structure/views/view/test_view/translate';

  // Test if the link to translate the test_view is on the page.
  $this
    ->assertLinkByHref($translate_link);

  // Test if the link to translate actually goes to the translate page.
  $this
    ->drupalGet($translate_link);
  $this
    ->assertRaw('<th>' . t('Language') . '</th>');

  // Test that the 'Edit' tab appears.
  $this
    ->assertLinkByHref('admin/structure/views/view/test_view');
}