Commit 348225aa authored by Changzheng Liu's avatar Changzheng Liu Committed by Tetiana Chupryna

Update the placeholder text of global search navbar

parent ece74fba
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
.search-input-container .search-input-container
.search-input-wrap .search-input-wrap
.dropdown{ data: { url: search_autocomplete_path } } .dropdown{ data: { url: search_autocomplete_path } }
= search_field_tag 'search', nil, placeholder: _('Search or jump to…'), = search_field_tag 'search', nil, placeholder: _('Search GitLab'),
class: 'search-input dropdown-menu-toggle no-outline js-search-dashboard-options', class: 'search-input dropdown-menu-toggle no-outline js-search-dashboard-options',
spellcheck: false, spellcheck: false,
autocomplete: 'off', autocomplete: 'off',
data: { issues_path: issues_dashboard_path, data: { issues_path: issues_dashboard_path,
mr_path: merge_requests_dashboard_path, mr_path: merge_requests_dashboard_path,
qa_selector: 'search_term_field' }, qa_selector: 'search_term_field' },
aria: { label: _('Search or jump to…') } aria: { label: _('Search GitLab') }
%button.hidden.js-dropdown-search-toggle{ type: 'button', data: { toggle: 'dropdown' } } %button.hidden.js-dropdown-search-toggle{ type: 'button', data: { toggle: 'dropdown' } }
.dropdown-menu.dropdown-select{ data: { testid: 'dashboard-search-options' } } .dropdown-menu.dropdown-select{ data: { testid: 'dashboard-search-options' } }
= dropdown_content do = dropdown_content do
......
...@@ -28357,6 +28357,9 @@ msgstr "" ...@@ -28357,6 +28357,9 @@ msgstr ""
msgid "Search" msgid "Search"
msgstr "" msgstr ""
msgid "Search GitLab"
msgstr ""
msgid "Search Jira issues" msgid "Search Jira issues"
msgstr "" msgstr ""
...@@ -28441,9 +28444,6 @@ msgstr "" ...@@ -28441,9 +28444,6 @@ msgstr ""
msgid "Search or filter results…" msgid "Search or filter results…"
msgstr "" msgstr ""
msgid "Search or jump to…"
msgstr ""
msgid "Search project" msgid "Search project"
msgstr "" msgstr ""
......
...@@ -25,6 +25,15 @@ RSpec.describe 'layouts/_search' do ...@@ -25,6 +25,15 @@ RSpec.describe 'layouts/_search' do
end end
shared_examples 'search context scope is set' do shared_examples 'search context scope is set' do
context 'when rendering' do
it 'sets the placeholder' do
render
expect(rendered).to include('placeholder="Search GitLab"')
expect(rendered).to include('aria-label="Search GitLab"')
end
end
context 'when on issues' do context 'when on issues' do
it 'sets scope to issues' do it 'sets scope to issues' do
render render
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment