Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b69fd313
Commit
b69fd313
authored
Apr 05, 2022
by
Dan Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add data-qa-selector to new search component
parent
75e3e1fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
app/assets/javascripts/header_search/components/app.vue
app/assets/javascripts/header_search/components/app.vue
+1
-0
app/views/layouts/_header_search.html.haml
app/views/layouts/_header_search.html.haml
+4
-1
qa/qa/page/main/menu.rb
qa/qa/page/main/menu.rb
+9
-0
No files found.
app/assets/javascripts/header_search/components/app.vue
View file @
b69fd313
...
...
@@ -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"
...
...
app/views/layouts/_header_search.html.haml
View file @
b69fd313
...
...
@@ -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
]
...
...
qa/qa/page/main/menu.rb
View file @
b69fd313
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment