ConfigTranslationUiTest.php

Same filename in this branch
  1. 9 core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php
Same filename in other branches
  1. 8.9.x core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php
  2. 8.9.x core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php
  3. 10 core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php
  4. 10 core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php
  5. 11.x core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php
  6. 11.x core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php

Namespace

Drupal\Tests\config_translation\FunctionalJavascript

File

core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php

View source
<?php

namespace Drupal\Tests\config_translation\FunctionalJavascript;

use Drupal\FunctionalJavascriptTests\WebDriverTestBase;

/**
 * Translate settings and entities to various languages.
 *
 * @group config_translation
 */
class ConfigTranslationUiTest extends WebDriverTestBase {
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'config_translation',
        'contextual',
        'node',
        'views',
        'views_ui',
    ];
    
    /**
     * {@inheritdoc}
     */
    protected $defaultTheme = 'stark';
    
    /**
     * 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.');
    }

}

Classes

Title Deprecated Summary
ConfigTranslationUiTest Translate settings and entities to various languages.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.