Unverified Commit 240dcf72 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3086795 by jhodgdon, mohrerao, dww: "Search help" link in search form...

Issue #3086795 by jhodgdon, mohrerao, dww: "Search help" link in search form is ambiguous and confusing
parent ed4655e3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public function buildForm(array $form, FormStateInterface $form_state, SearchPag
    $form['help_link'] = [
      '#type' => 'link',
      '#url' => new Url('search.help_' . $this->entity->id()),
      '#title' => $this->t('Search help'),
      '#title' => $this->t('About searching'),
      '#options' => ['attributes' => ['class' => 'search-help-link']],
    ];

+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ public function routes() {
        '/search/' . $entity->getPath() . '/help',
        [
          '_controller' => 'Drupal\search\Controller\SearchController::searchHelp',
          '_title' => 'Search help',
          '_title' => 'About searching',
          'entity' => $entity_id,
        ],
        [
+4 −4
Original line number Diff line number Diff line
@@ -86,8 +86,8 @@ public function testSearchText() {
    $this->assertNoText(t('Node'), 'Erroneous translated tab and breadcrumb text is not present');
    $this->assertText(t('Content'), 'Tab and breadcrumb text is present');

    $this->clickLink('Search help');
    $this->assertText('Search help', 'Correct title is on search help page');
    $this->clickLink('About searching');
    $this->assertText('About searching', 'Correct title is on search help page');
    $this->assertText('Use upper-case OR to get more results', 'Correct text is on content search help page');

    // Search for a longer text, and see that it is in the title, truncated.
@@ -109,8 +109,8 @@ public function testSearchText() {
    $this->assertText(t('Search'));
    $this->assertSession()->titleEquals('Search for ' . Unicode::truncate($this->searchingUser->getAccountName(), 60, TRUE, TRUE) . ' | Drupal');

    $this->clickLink('Search help');
    $this->assertText('Search help', 'Correct title is on search help page');
    $this->clickLink('About searching');
    $this->assertText('About searching', 'Correct title is on search help page');
    $this->assertText('user names and partial user names', 'Correct text is on user search help page');

    // Test that search keywords containing slashes are correctly loaded