ConfigTranslationUiTest.php 949 Bytes
Newer Older
1 2 3 4
<?php

namespace Drupal\Tests\config_translation\FunctionalJavascript;

5
use Drupal\FunctionalJavascriptTests\JavascriptTestBase;
6 7 8 9 10 11

/**
 * Translate settings and entities to various languages.
 *
 * @group config_translation
 */
12
class ConfigTranslationUiTest extends JavascriptTestBase {
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

  /**
   * {@inheritdoc}
   */
  public static $modules = [
    'config_translation',
    'contextual',
    'node',
    'views',
    'views_ui',
  ];

  /**
   * Tests that contextual link related to views.
   */
  public function testViewContextualLink() {
    $user = $this->drupalCreateUser([
      'translate configuration',
      'access contextual links',
    ]);
    $this->drupalLogin($user);

    $this->drupalGet('node');
    $contextualLinks = $this->assertSession()->waitForElement('css', '.contextual-links');
    $link = $contextualLinks->findLink('Translate view');
    $this->assertNotNull($link, 'Translate view contextual link added.');
  }

}