Commit b69fd313 authored by Dan Davison's avatar Dan Davison

Add data-qa-selector to new search component

parent 75e3e1fe
......@@ -150,6 +150,7 @@ export default {
v-model="searchText"
role="searchbox"
class="gl-z-index-1"
data-qa-selector="search_term_field"
autocomplete="off"
:placeholder="$options.i18n.searchGitlab"
:aria-activedescendant="currentFocusedId"
......
......@@ -6,7 +6,10 @@
= form_tag search_path, method: :get do |_f|
.gl-search-box-by-type
= sprite_icon('search', css_class: 'gl-search-box-by-type-search-icon gl-icon')
%input{ id: 'search', name: 'search', type: "text", placeholder: s_('GlobalSearch|Search GitLab'), class: 'form-control gl-form-input gl-search-box-by-type-input', autocomplete: 'off' }
%input{ id: 'search', name: 'search', type: "text", placeholder: s_('GlobalSearch|Search GitLab'),
class: 'form-control gl-form-input gl-search-box-by-type-input',
autocomplete: 'off',
data: { qa_selector: 'search_box' } }
= hidden_field_tag :group_id, header_search_context[:group][:id] if header_search_context[:group]
= hidden_field_tag :project_id, header_search_context[:project][:id] if header_search_context[:project]
......
......@@ -45,6 +45,14 @@ module QA
element :search_term_field
end
view 'app/views/layouts/_header_search.html.haml' do
element :search_box
end
view 'app/assets/javascripts/header_search/components/app.vue' do
element :search_term_field
end
def go_to_groups
within_groups_menu do
click_element(:menu_item_link, title: 'Your groups')
......@@ -146,6 +154,7 @@ module QA
end
def search_for(term)
click_element(:search_box)
fill_element :search_term_field, "#{term}\n"
end
......
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