Add a button to apply issues filter to search results (#38481).

Patch by Go MAEDA.


git-svn-id: https://svn.redmine.org/redmine/trunk@22212 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2023-04-27 04:10:33 +00:00
parent 135606bcf5
commit ccf8e7d299
5 changed files with 96 additions and 0 deletions

View File

@@ -95,6 +95,7 @@ class SearchControllerTest < Redmine::ControllerTest
assert_select 'input[name=all_words][checked=checked]'
assert_select 'input[name=titles_only]:not([checked])'
assert_select 'p.buttons a', :text => 'Apply issues filter'
assert_select '#search-results' do
assert_select 'dt.issue a', :text => /Bug #5/
assert_select 'dt.issue-closed a', :text => /Bug #8 \(Closed\)/
@@ -457,4 +458,15 @@ class SearchControllerTest < Redmine::ControllerTest
assert_select '#search-results dt.project', 0
end
def test_search_should_not_show_apply_issues_filter_button_if_no_issues_found
get :index, :params => {:q => 'commits'}
assert_response :success
assert_select 'p.buttons a', :text => 'Apply issues filter', :count => 0
assert_select '#search-results' do
assert_select 'dt.issue', :count => 0
assert_select 'dt.issue-closed', :count => 0
end
end
end