summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorSato Hiroyuki <sathiroyuki@gmail.com>2013-04-14 09:15:35 +0000
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-05-13 18:46:33 +0900
commit1738055dabb902b45d07839bec053bfc59fd05ee (patch)
treeb67af5a0dde9dfdc4d0554901380218347f0f100 /features
parent6505cd5ec95987b585a08294b53b5b1c2a5e38fc (diff)
downloadgitlab-ce-1738055dabb902b45d07839bec053bfc59fd05ee.tar.gz
Add test for "Show only selected tag"
Diffstat (limited to 'features')
-rw-r--r--features/project/network.feature9
-rw-r--r--features/steps/project/project_network_graph.rb26
2 files changed, 35 insertions, 0 deletions
diff --git a/features/project/network.feature b/features/project/network.feature
index 538124a4c5f..f98e19b60d3 100644
--- a/features/project/network.feature
+++ b/features/project/network.feature
@@ -25,3 +25,12 @@ Feature: Project Network Graph
Then page should have network graph
And page should select "master" in select box
And page should have "v2.1.0" on graph
+
+ @javascript
+ Scenario: I should filter selected tag
+ When I switch ref to "v2.1.0"
+ Then page should have content not cotaining "v2.1.0"
+ When click "Show only selected branch" checkbox
+ Then page should not have content not cotaining "v2.1.0"
+ When click "Show only selected branch" checkbox
+ Then page should have content not cotaining "v2.1.0"
diff --git a/features/steps/project/project_network_graph.rb b/features/steps/project/project_network_graph.rb
index 8db6a39e99f..48a73f09fac 100644
--- a/features/steps/project/project_network_graph.rb
+++ b/features/steps/project/project_network_graph.rb
@@ -19,6 +19,10 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
page.should have_selector '#ref_chzn span', text: "master"
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 "master" on graph' do
within '.graph' do
page.should have_content 'master'
@@ -35,6 +39,28 @@ 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
+
+ When 'click "Show only selected branch" checkbox' do
+ find('#filter_ref').click
+ sleep 2
+ end
+
+ Then 'page should have content not cotaining "v2.1.0"' do
+ within '.graph' do
+ page.should have_content 'cleaning'
+ end
+ end
+
+ Then 'page should not have content not cotaining "v2.1.0"' do
+ within '.graph' do
+ page.should_not have_content 'cleaning'
+ end
+ end
+
And 'page should select "stable" in select box' do
page.should have_selector '#ref_chzn span', text: "stable"
end