mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-29 05:18:49 +01:00
this patch adds some basic tests for the downdrilling. Also some text is added to the charts on the stats page to show that downdrilling is possible
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@721 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
2bfe4c5534
commit
510048178a
3 changed files with 31 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
&title=Current running time of all uncompleted actions,{font-size:16},&
|
||||
&y_legend=Actions,10,0x736AFF&
|
||||
&y2_legend=Percentage,10,0xFF0000&
|
||||
&x_legend=Running time of an action (weeks),12,0x736AFF&
|
||||
&x_legend=Running time of an action (weeks). Click on a bar for more info,11,0x736AFF&
|
||||
&y_ticks=5,10,5&
|
||||
&filled_bar=50,0x9933CC,0x8010A0&
|
||||
&values=
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
&title=Current running time of uncompleted visible actions,{font-size:16},&
|
||||
&y_legend=Actions,10,0x736AFF&
|
||||
&y2_legend=Percentage,10,0xFF0000&
|
||||
&x_legend=Running time of an action (weeks),12,0x736AFF&
|
||||
&x_legend=Running time of an action (weeks). Click on a bar for more info,11,0x736AFF&
|
||||
&y_ticks=5,10,5&
|
||||
&filled_bar=50,0x9933CC,0x8010A0&
|
||||
&values=
|
||||
|
|
|
|||
|
|
@ -62,4 +62,33 @@ class StatsControllerTest < Test::Unit::TestCase
|
|||
assert_equal 2.week.ago.utc.beginning_of_day, assigns['first_action'].created_at
|
||||
end
|
||||
|
||||
def test_downdrill
|
||||
login_as(:admin_user)
|
||||
|
||||
# drill down without parameters
|
||||
get :show_selected_actions_from_chart
|
||||
assert_response :not_found
|
||||
assert_template nil
|
||||
|
||||
# get week 0-1 for actions visible running
|
||||
get :show_selected_actions_from_chart, :id => 'avrt', :index => 0
|
||||
assert_response :success
|
||||
assert_template "stats/show_selection_from_chart"
|
||||
|
||||
# get week 0 and further for actions visible running
|
||||
get :show_selected_actions_from_chart, :id => 'avrt_end', :index => 0
|
||||
assert_response :success
|
||||
assert_template "stats/show_selection_from_chart"
|
||||
|
||||
# get week 0-1 for actions running
|
||||
get :show_selected_actions_from_chart, :id => 'art', :index => 0
|
||||
assert_response :success
|
||||
assert_template "stats/show_selection_from_chart"
|
||||
|
||||
# get week 0 and further for actions running
|
||||
get :show_selected_actions_from_chart, :id => 'art_end', :index => 0
|
||||
assert_response :success
|
||||
assert_template "stats/show_selection_from_chart"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue