Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / config_translation / tests / src / FunctionalJavascript / ConfigTranslationUiTest.php
diff --git a/web/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php b/web/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php
new file mode 100644 (file)
index 0000000..13e1b54
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+
+namespace Drupal\Tests\config_translation\FunctionalJavascript;
+
+use Drupal\FunctionalJavascriptTests\JavascriptTestBase;
+
+/**
+ * Translate settings and entities to various languages.
+ *
+ * @group config_translation
+ */
+class ConfigTranslationUiTest extends JavascriptTestBase {
+
+  /**
+   * {@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.');
+  }
+
+}