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:
lrbalt 2008-03-02 20:33:04 +00:00
parent 2bfe4c5534
commit 510048178a
3 changed files with 31 additions and 2 deletions

View file

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

View file

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

View file

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