summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSato Hiroyuki <sathiroyuki@gmail.com>2013-04-25 22:05:22 +0900
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-04-25 20:54:00 +0000
commit963ec23407760bcd86ac989916140b1e8f6d5c0c (patch)
tree6c1a168e848a398a94663fe099a1b924e49421d3
parentb36b40ca40c1a380e74ac5384ef40938323307a8 (diff)
downloadgitlab-ce-963ec23407760bcd86ac989916140b1e8f6d5c0c.tar.gz
Add test related to a bug of network graph.
-rw-r--r--features/project/network.feature10
-rw-r--r--features/steps/project/project_network_graph.rb9
2 files changed, 15 insertions, 4 deletions
diff --git a/features/project/network.feature b/features/project/network.feature
index a6cbd2c4781..538124a4c5f 100644
--- a/features/project/network.feature
+++ b/features/project/network.feature
@@ -11,14 +11,16 @@ Feature: Project Network Graph
And page should have "master" on graph
@javascript
- Scenario: I should switch ref to "stable"
+ Scenario: I should switch "branch" and "tag"
When I switch ref to "stable"
- Then page should have network graph
- And page should select "stable" in select box
+ Then page should select "stable" in select box
And page should have "stable" on graph
+ When I switch ref to "v2.1.0"
+ Then page should select "v2.1.0" in select box
+ And page should have "v2.1.0" on graph
@javascript
- Scenario: I should looking for a commit by SHA of "v2.1.0"
+ Scenario: I should looking for a commit by SHA
When I looking for a commit by SHA of "v2.1.0"
Then page should have network graph
And page should select "master" in select box
diff --git a/features/steps/project/project_network_graph.rb b/features/steps/project/project_network_graph.rb
index cf5fa751ccf..763b4de2abc 100644
--- a/features/steps/project/project_network_graph.rb
+++ b/features/steps/project/project_network_graph.rb
@@ -30,10 +30,19 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
sleep 2
end
+ When 'I switch ref to "v2.1.0"' do
+ page.select 'v2.1.0', :from => 'ref'
+ sleep 2
+ end
+
And 'page should select "stable" in select box' do
page.should have_selector '#ref_chzn span', :text => "stable"
end
+ And 'page should select "v2.1.0" in select box' do
+ page.should have_selector '#ref_chzn span', :text => "v2.1.0"
+ end
+
And 'page should have "stable" on graph' do
within '.graph' do
page.should have_content 'stable'