Commit 1738055d authored by Sato Hiroyuki's avatar Sato Hiroyuki

Add test for "Show only selected tag"

parent 6505cd5e
...@@ -25,3 +25,12 @@ Feature: Project Network Graph ...@@ -25,3 +25,12 @@ Feature: Project Network Graph
Then page should have network graph Then page should have network graph
And page should select "master" in select box And page should select "master" in select box
And page should have "v2.1.0" on graph 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"
...@@ -19,6 +19,10 @@ class ProjectNetworkGraph < Spinach::FeatureSteps ...@@ -19,6 +19,10 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
page.should have_selector '#ref_chzn span', text: "master" page.should have_selector '#ref_chzn span', text: "master"
end 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 And 'page should have "master" on graph' do
within '.graph' do within '.graph' do
page.should have_content 'master' page.should have_content 'master'
...@@ -35,6 +39,28 @@ class ProjectNetworkGraph < Spinach::FeatureSteps ...@@ -35,6 +39,28 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
sleep 2 sleep 2
end 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 And 'page should select "stable" in select box' do
page.should have_selector '#ref_chzn span', text: "stable" page.should have_selector '#ref_chzn span', text: "stable"
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment