@@ -89,6 +89,7 module QueriesHelper | |||||
89 | query.available_totalable_columns.each do |column| |
|
89 | query.available_totalable_columns.each do |column| | |
90 | tags << content_tag('label', check_box_tag('t[]', column.name.to_s, query.totalable_columns.include?(column), :id => nil) + " #{column.caption}", :class => 'inline') |
|
90 | tags << content_tag('label', check_box_tag('t[]', column.name.to_s, query.totalable_columns.include?(column), :id => nil) + " #{column.caption}", :class => 'inline') | |
91 | end |
|
91 | end | |
|
92 | tags << hidden_field_tag('t[]', '') | |||
92 | tags |
|
93 | tags | |
93 | end |
|
94 | end | |
94 |
|
95 |
@@ -290,4 +290,24 class Redmine::UiTest::IssuesTest < Redmine::UiTest::Base | |||||
290 | assert Issue.find(1).watched_by?(User.find_by_login('jsmith')) |
|
290 | assert Issue.find(1).watched_by?(User.find_by_login('jsmith')) | |
291 | assert Issue.find(4).watched_by?(User.find_by_login('jsmith')) |
|
291 | assert Issue.find(4).watched_by?(User.find_by_login('jsmith')) | |
292 | end |
|
292 | end | |
|
293 | ||||
|
294 | def test_issue_list_with_default_totalable_columns | |||
|
295 | log_user('admin', 'admin') | |||
|
296 | with_settings :issue_list_default_totals => ['estimated_hours'] do | |||
|
297 | visit '/projects/ecookbook/issues' | |||
|
298 | # Check that the page shows the Estimated hours total | |||
|
299 | assert page.has_css?('p.query-totals') | |||
|
300 | assert page.has_css?('span.total-for-estimated-hours') | |||
|
301 | # Open the Options of the form (necessary for having the totalable columns options clickable) | |||
|
302 | page.all('legend')[1].click | |||
|
303 | # Deselect the default totalable column (none should be left) | |||
|
304 | page.first('input[name="t[]"][value="estimated_hours"]').click | |||
|
305 | within('#query_form') do | |||
|
306 | click_link 'Apply' | |||
|
307 | end | |||
|
308 | # Check that Totals are not present in the reloaded page | |||
|
309 | assert !page.has_css?('p.query-totals') | |||
|
310 | assert !page.has_css?('span.total-for-estimated-hours') | |||
|
311 | end | |||
|
312 | end | |||
293 | end |
|
313 | end |
General Comments 0
You need to be logged in to leave comments.
Login now