3 namespace Drupal\config_translation\Tests;
5 use Drupal\views_ui\Tests\UITestBase;
8 * Visit view list and test if translate is available.
10 * @group config_translation
12 class ConfigTranslationViewListUiTest extends UITestBase {
15 * Views used by this test.
19 public static $testViews = ['node', 'test_view'];
26 public static $modules = ['config_translation', 'views_ui'];
28 protected function setUp() {
33 'translate configuration',
36 // Create and log in user.
37 $this->drupalLogin($this->drupalCreateUser($permissions));
41 * Tests views_ui list to see if translate link is added to operations.
43 public function testTranslateOperationInViewListUi() {
44 // Views UI List 'admin/structure/views'.
45 $this->drupalGet('admin/structure/views');
46 $translate_link = 'admin/structure/views/view/test_view/translate';
47 // Test if the link to translate the test_view is on the page.
48 $this->assertLinkByHref($translate_link);
50 // Test if the link to translate actually goes to the translate page.
51 $this->drupalGet($translate_link);
52 $this->assertRaw('<th>' . t('Language') . '</th>');
54 // Test that the 'Edit' tab appears.
55 $this->assertLinkByHref('admin/structure/views/view/test_view');