diff --git a/core/modules/help_topics/tests/modules/help_topics_test/help_topics/help_topics_test.test.html.twig b/core/modules/help_topics/tests/modules/help_topics_test/help_topics/help_topics_test.test.html.twig index a2234207fa..43b95d91a9 100644 --- a/core/modules/help_topics/tests/modules/help_topics_test/help_topics/help_topics_test.test.html.twig +++ b/core/modules/help_topics/tests/modules/help_topics_test/help_topics/help_topics_test.test.html.twig @@ -3,5 +3,5 @@ {% set help_topic_url = render_var(url('help_topics.help_topic', {id: 'help_topics.help_topic_writing'})) %}
{% trans %}This is a test. It should link to the writing good help topic. Also there should be a related topic link below to the Help module topic page and the linked topic.{% endtrans %}
-{% trans %}Test translation.{% endtrans %}
{% trans %}Nonworditem totranslate.{% endtrans %}
+{% trans %}Test translation.{% endtrans %}
diff --git a/core/modules/help_topics/tests/modules/help_topics_test/src/Plugin/HelpSection/TestHelpSection.php b/core/modules/help_topics/tests/modules/help_topics_test/src/Plugin/HelpSection/TestHelpSection.php index fd928a5e5e..69d3f81c5d 100644 --- a/core/modules/help_topics/tests/modules/help_topics_test/src/Plugin/HelpSection/TestHelpSection.php +++ b/core/modules/help_topics/tests/modules/help_topics_test/src/Plugin/HelpSection/TestHelpSection.php @@ -66,7 +66,7 @@ public function renderTopicForSearch($id, LanguageInterface $language) { ]; } return [ - 'title' => 'Barmm Foreign', + 'title' => 'Barmm Foreign sdeeeee', 'text' => 'Fake foreign barmm anotherwordgerman sqruct', 'url' => Url::fromUri('https://mm.bar.com'), ]; diff --git a/core/modules/help_topics/tests/src/Functional/HelpTopicSearchTest.php b/core/modules/help_topics/tests/src/Functional/HelpTopicSearchTest.php index 251b05a10e..dc13a5c5ff 100644 --- a/core/modules/help_topics/tests/src/Functional/HelpTopicSearchTest.php +++ b/core/modules/help_topics/tests/src/Functional/HelpTopicSearchTest.php @@ -124,12 +124,18 @@ public function testHelpSearch() { $this->drupalPostForm('search/help', ['keys' => 'nonworditem'], 'Search'); $this->assertSearchResultsCount(1); $this->assertLink('ABC Help Test module'); + // Click the link and verify we ended up on the topic page. + $this->clickLink('ABC Help Test module'); + $session->pageTextContains('This is a test'); + $this->drupalPostForm('search/help', ['keys' => 'nonwordgerman'], 'Search', [ 'language' => $german, ]); $this->assertSearchResultsCount(1); $this->assertLink('ABC-Hilfetestmodul'); + $this->clickLink('ABC-Hilfetestmodul'); + $session->pageTextContains('Übersetzung testen.'); // Verify that we can search from the admin/help page. $this->drupalGet('admin/help'); @@ -138,18 +144,12 @@ public function testHelpSearch() { $this->assertSearchResultsCount(1); $this->assertLink('ABC Help Test module'); - // Click the link and verify we ended up on the topic page. - $this->clickLink('ABC Help Test module'); - $session->pageTextContains('This is a test'); - // Same for German. $this->drupalPostForm('admin/help', ['keys' => 'nonwordgerman'], 'Search', [ 'language' => $german, ]); $this->assertSearchResultsCount(1); $this->assertLink('ABC-Hilfetestmodul'); - $this->clickLink('ABC-Hilfetestmodul'); - $session->pageTextContains('Übersetzung testen.'); // Verify we can search for title text (other searches used text // that was part of the body). @@ -157,6 +157,12 @@ public function testHelpSearch() { $this->assertSearchResultsCount(1); $this->assertLink('Foo in English title wcsrefsdf'); + $this->drupalPostForm('admin/help', ['keys' => 'sdeeeee'], 'Search', [ + 'language' => $german, + ]); + $this->assertSearchResultsCount(1); + $this->assertLink('Barmm Foreign sdeeeee'); + // Verify the cache tags and contexts. $session->responseHeaderContains('X-Drupal-Cache-Tags', 'config:search.page.help_search'); $session->responseHeaderContains('X-Drupal-Cache-Tags', 'search_index:help_search');