Commit 963ec23407760bcd86ac989916140b1e8f6d5c0c

Authored by Sato Hiroyuki
1 parent b36b40ca

Add test related to a bug of network graph.

features/project/network.feature
@@ -11,14 +11,16 @@ Feature: Project Network Graph @@ -11,14 +11,16 @@ Feature: Project Network Graph
11 And page should have "master" on graph 11 And page should have "master" on graph
12 12
13 @javascript 13 @javascript
14 - Scenario: I should switch ref to "stable" 14 + Scenario: I should switch "branch" and "tag"
15 When I switch ref to "stable" 15 When I switch ref to "stable"
16 - Then page should have network graph  
17 - And page should select "stable" in select box 16 + Then page should select "stable" in select box
18 And page should have "stable" on graph 17 And page should have "stable" on graph
  18 + When I switch ref to "v2.1.0"
  19 + Then page should select "v2.1.0" in select box
  20 + And page should have "v2.1.0" on graph
19 21
20 @javascript 22 @javascript
21 - Scenario: I should looking for a commit by SHA of "v2.1.0" 23 + Scenario: I should looking for a commit by SHA
22 When I looking for a commit by SHA of "v2.1.0" 24 When I looking for a commit by SHA of "v2.1.0"
23 Then page should have network graph 25 Then page should have network graph
24 And page should select "master" in select box 26 And page should select "master" in select box
features/steps/project/project_network_graph.rb
@@ -30,10 +30,19 @@ class ProjectNetworkGraph < Spinach::FeatureSteps @@ -30,10 +30,19 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
30 sleep 2 30 sleep 2
31 end 31 end
32 32
  33 + When 'I switch ref to "v2.1.0"' do
  34 + page.select 'v2.1.0', :from => 'ref'
  35 + sleep 2
  36 + end
  37 +
33 And 'page should select "stable" in select box' do 38 And 'page should select "stable" in select box' do
34 page.should have_selector '#ref_chzn span', :text => "stable" 39 page.should have_selector '#ref_chzn span', :text => "stable"
35 end 40 end
36 41
  42 + And 'page should select "v2.1.0" in select box' do
  43 + page.should have_selector '#ref_chzn span', :text => "v2.1.0"
  44 + end
  45 +
37 And 'page should have "stable" on graph' do 46 And 'page should have "stable" on graph' do
38 within '.graph' do 47 within '.graph' do
39 page.should have_content 'stable' 48 page.should have_content 'stable'