Commit 4bb8a4e3 authored by Denys Mishunov's avatar Denys Mishunov

Replaced breadcrumbs with title on Search page

parent 9e421d6d
- @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'
......
......@@ -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
......
# 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
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