Commit faaedbf0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix network tests

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 3a017a4e
...@@ -12,28 +12,28 @@ Feature: Project Network Graph ...@@ -12,28 +12,28 @@ Feature: Project Network Graph
@javascript @javascript
Scenario: I should switch "branch" and "tag" Scenario: I should switch "branch" and "tag"
When I switch ref to "stable" When I switch ref to "feature"
Then page should select "stable" in select box Then page should select "feature" in select box
And page should have "stable" on graph And page should have "feature" on graph
When I switch ref to "v2.1.0" When I switch ref to "v1.0.0"
Then page should select "v2.1.0" in select box Then page should select "v1.0.0" in select box
And page should have "v2.1.0" on graph And page should have "v1.0.0" on graph
@javascript @javascript
Scenario: I should looking for a commit by SHA Scenario: I should looking for a commit by SHA
When I looking for a commit by SHA of "v2.1.0" When I looking for a commit by SHA of "v1.0.0"
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 "v1.0.0" on graph
@javascript @javascript
Scenario: I should filter selected tag Scenario: I should filter selected tag
When I switch ref to "v2.1.0" When I switch ref to "v1.0.0"
Then page should have content not containing "v2.1.0" Then page should have content not containing "v1.0.0"
When click "Show only selected branch" checkbox When click "Show only selected branch" checkbox
Then page should not have content not containing "v2.1.0" Then page should not have content not containing "v1.0.0"
When click "Show only selected branch" checkbox When click "Show only selected branch" checkbox
Then page should have content not containing "v2.1.0" Then page should have content not containing "v1.0.0"
Scenario: I should fail to look for a commit Scenario: I should fail to look for a commit
When I look for a commit by ";" When I look for a commit by ";"
......
...@@ -19,8 +19,8 @@ class ProjectNetworkGraph < Spinach::FeatureSteps ...@@ -19,8 +19,8 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
page.should have_selector '.select2-chosen', text: "master" page.should have_selector '.select2-chosen', text: "master"
end end
And 'page should select "v2.1.0" in select box' do And 'page should select "v1.0.0" in select box' do
page.should have_selector '.select2-chosen', text: "v2.1.0" page.should have_selector '.select2-chosen', text: "v1.0.0"
end end
And 'page should have "master" on graph' do And 'page should have "master" on graph' do
...@@ -29,13 +29,13 @@ class ProjectNetworkGraph < Spinach::FeatureSteps ...@@ -29,13 +29,13 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
end end
end end
When 'I switch ref to "stable"' do When 'I switch ref to "feature"' do
page.select 'stable', from: 'ref' page.select 'feature', from: 'ref'
sleep 2 sleep 2
end end
When 'I switch ref to "v2.1.0"' do When 'I switch ref to "v1.0.0"' do
page.select 'v2.1.0', from: 'ref' page.select 'v1.0.0', from: 'ref'
sleep 2 sleep 2
end end
...@@ -44,43 +44,43 @@ class ProjectNetworkGraph < Spinach::FeatureSteps ...@@ -44,43 +44,43 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
sleep 2 sleep 2
end end
Then 'page should have content not containing "v2.1.0"' do Then 'page should have content not containing "v1.0.0"' do
within '.network-graph' do within '.network-graph' do
page.should have_content 'cleaning' page.should have_content 'Change some files'
end end
end end
Then 'page should not have content not containing "v2.1.0"' do Then 'page should not have content not containing "v1.0.0"' do
within '.network-graph' do within '.network-graph' do
page.should_not have_content 'cleaning' page.should_not have_content 'Change some files'
end end
end end
And 'page should select "stable" in select box' do And 'page should select "feature" in select box' do
page.should have_selector '.select2-chosen', text: "stable" page.should have_selector '.select2-chosen', text: "feature"
end end
And 'page should select "v2.1.0" in select box' do And 'page should select "v1.0.0" in select box' do
page.should have_selector '.select2-chosen', text: "v2.1.0" page.should have_selector '.select2-chosen', text: "v1.0.0"
end end
And 'page should have "stable" on graph' do And 'page should have "feature" on graph' do
within '.network-graph' do within '.network-graph' do
page.should have_content 'stable' page.should have_content 'feature'
end end
end end
When 'I looking for a commit by SHA of "v2.1.0"' do When 'I looking for a commit by SHA of "v1.0.0"' do
within ".network-form" do within ".network-form" do
fill_in 'extended_sha1', with: '98d6492' fill_in 'extended_sha1', with: '6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9'
find('button').click find('button').click
end end
sleep 2 sleep 2
end end
And 'page should have "v2.1.0" on graph' do And 'page should have "v1.0.0" on graph' do
within '.network-graph' do within '.network-graph' do
page.should have_content 'v2.1.0' page.should have_content 'v1.0.0'
end end
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