ConfigTranslationUiTest.php in Drupal 10
File
core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php
View source
<?php
namespace Drupal\Tests\config_translation\FunctionalJavascript;
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
class ConfigTranslationUiTest extends WebDriverTestBase {
protected static $modules = [
'config_translation',
'contextual',
'node',
'views',
'views_ui',
];
protected $defaultTheme = 'stark';
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.');
}
}