diff --git a/app/assets/javascripts/app/controllers/search.coffee b/app/assets/javascripts/app/controllers/search.coffee index 33751184f..699563ec3 100644 --- a/app/assets/javascripts/app/controllers/search.coffee +++ b/app/assets/javascripts/app/controllers/search.coffee @@ -37,10 +37,8 @@ class App.Search extends App.Controller ) meta: => - if @query - title = App.Utils.htmlEscape(@query) - else - title = App.i18n.translateInline('Extended Search') + title = @query || App.i18n.translateInline('Extended Search') + meta = url: @url() id: '' diff --git a/spec/system/search_spec.rb b/spec/system/search_spec.rb new file mode 100644 index 000000000..c8000785e --- /dev/null +++ b/spec/system/search_spec.rb @@ -0,0 +1,17 @@ +require 'rails_helper' + +RSpec.describe 'Search', type: :system, authenticated: true, searchindex: true do + before do + configure_elasticsearch(required: true, rebuild: true) + end + + it 'shows default widgets' do + fill_in id: 'global-search', with: '"Welcome"' + + click_on 'Show Search Details' + + within '#navigation .tasks a[data-key=Search]' do + expect(page).to have_text '"Welcome"' + end + end +end