Fixes #3058 - Search details sidebar name shows URL-encoded gibberish

This commit is contained in:
Mantas 2020-05-19 14:44:12 +03:00 committed by Martin Edenhofer
parent d6f5baa87e
commit ff5f175640
2 changed files with 19 additions and 4 deletions

View file

@ -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: ''

View file

@ -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