diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-12 06:03:40 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-12 06:03:40 +0000 |
commit | 3bd4124ab2b0afb2b427ea58a7fe8deae184d7d8 (patch) | |
tree | 3e497675779ab6447c93d03b33f6c5d73d80a8d9 | |
parent | 2aa354f370ef3f662e2a97fb76ecc4cfff5723dc (diff) | |
download | redmine-3bd4124ab2b0afb2b427ea58a7fe8deae184d7d8.tar.gz redmine-3bd4124ab2b0afb2b427ea58a7fe8deae184d7d8.zip |
Merged r15510 (#22123).
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@15515 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/helpers/queries_helper.rb | 1 | ||||
-rw-r--r-- | test/ui/issues_test_ui.rb | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 4b71d0832..1dec57f86 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -89,6 +89,7 @@ module QueriesHelper query.available_totalable_columns.each do |column| tags << content_tag('label', check_box_tag('t[]', column.name.to_s, query.totalable_columns.include?(column), :id => nil) + " #{column.caption}", :class => 'inline') end + tags << hidden_field_tag('t[]', '') tags end diff --git a/test/ui/issues_test_ui.rb b/test/ui/issues_test_ui.rb index 1af658ebf..0ab5d6a8b 100644 --- a/test/ui/issues_test_ui.rb +++ b/test/ui/issues_test_ui.rb @@ -290,4 +290,24 @@ class Redmine::UiTest::IssuesTest < Redmine::UiTest::Base assert Issue.find(1).watched_by?(User.find_by_login('jsmith')) assert Issue.find(4).watched_by?(User.find_by_login('jsmith')) end + + def test_issue_list_with_default_totalable_columns + log_user('admin', 'admin') + with_settings :issue_list_default_totals => ['estimated_hours'] do + visit '/projects/ecookbook/issues' + # Check that the page shows the Estimated hours total + assert page.has_css?('p.query-totals') + assert page.has_css?('span.total-for-estimated-hours') + # Open the Options of the form (necessary for having the totalable columns options clickable) + page.all('legend')[1].click + # Deselect the default totalable column (none should be left) + page.first('input[name="t[]"][value="estimated_hours"]').click + within('#query_form') do + click_link 'Apply' + end + # Check that Totals are not present in the reloaded page + assert !page.has_css?('p.query-totals') + assert !page.has_css?('span.total-for-estimated-hours') + end + end end |