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
4bb8a4e3
Commit
4bb8a4e3
authored
Jul 24, 2019
by
Denys Mishunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced breadcrumbs with title on Search page
parent
9e421d6d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
2 deletions
+43
-2
app/views/search/show.html.haml
app/views/search/show.html.haml
+5
-1
spec/features/search/user_uses_header_search_field_spec.rb
spec/features/search/user_uses_header_search_field_spec.rb
+1
-1
spec/views/search/show.html.haml_spec.rb
spec/views/search/show.html.haml_spec.rb
+37
-0
No files found.
app/views/search/show.html.haml
View file @
4bb8a4e3
-
@hide_top_links
=
true
-
breadcrumb_title
_
(
"Search"
)
-
page_title
@search_term
-
@hide_breadcrumbs
=
true
.page-title-holder.d-flex.align-items-center
%h1
.page-title
<
=
_
(
'Search'
)
.prepend-top-default
=
render
'search/form'
...
...
spec/features/search/user_uses_header_search_field_spec.rb
View file @
4bb8a4e3
...
...
@@ -22,7 +22,7 @@ describe 'User uses header search field', :js do
fill_in
(
'search'
,
with:
'gitlab'
)
find
(
'#search'
).
native
.
send_keys
(
:enter
)
page
.
within
(
'.
breadcrumbs-sub
-title'
)
do
page
.
within
(
'.
page
-title'
)
do
expect
(
page
).
to
have_content
(
'Search'
)
end
end
...
...
spec/views/search/show.html.haml_spec.rb
0 → 100644
View file @
4bb8a4e3
# frozen_string_literal: true
require
'spec_helper'
describe
'search/show'
do
let
(
:search_term
)
{
nil
}
before
do
stub_template
"search/_category.html.haml"
=>
'Category Partial'
stub_template
"search/_results.html.haml"
=>
'Results Partial'
@search_term
=
search_term
render
end
context
'when the search page is opened'
do
it
'displays the title'
do
expect
(
rendered
).
to
have_selector
(
'h1.page-title'
,
text:
'Search'
)
expect
(
rendered
).
not_to
have_selector
(
'h1.page-title code'
)
end
it
'does not render partials'
do
expect
(
rendered
).
not_to
render_template
(
'search/_category'
)
expect
(
rendered
).
not_to
render_template
(
'search/_results'
)
end
end
context
'when search term is supplied'
do
let
(
:search_term
)
{
'Search Foo'
}
it
'renders partials'
do
expect
(
rendered
).
to
render_template
(
'search/_category'
)
expect
(
rendered
).
to
render_template
(
'search/_results'
)
end
end
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