Commit f0c73a5b authored by Stan Hu's avatar Stan Hu

Remove sleeps from network graph feature spec

parent 30ab290b
...@@ -34,9 +34,10 @@ Feature: Project Network Graph ...@@ -34,9 +34,10 @@ Feature: Project Network Graph
@javascript @javascript
Scenario: I should filter selected tag Scenario: I should filter selected tag
When I switch ref to "v1.0.0" When I switch ref to "v1.0.0"
Then page should have "v1.0.0" in title
Then page should have content not containing "v1.0.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 "v1.0.0" Then page should only have content from "v1.0.0"
When click "Show only selected branch" checkbox When click "Show only selected branch" checkbox
Then page should have content not containing "v1.0.0" Then page should have content not containing "v1.0.0"
......
...@@ -41,17 +41,14 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps ...@@ -41,17 +41,14 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps
When 'I switch ref to "feature"' do When 'I switch ref to "feature"' do
select 'feature', from: 'ref' select 'feature', from: 'ref'
sleep 2
end end
When 'I switch ref to "v1.0.0"' do When 'I switch ref to "v1.0.0"' do
select 'v1.0.0', from: 'ref' select 'v1.0.0', from: 'ref'
sleep 2
end end
When 'click "Show only selected branch" checkbox' do When 'click "Show only selected branch" checkbox' do
find('#filter_ref').click find('#filter_ref').click
sleep 2
end end
step 'page should have content not containing "v1.0.0"' do step 'page should have content not containing "v1.0.0"' do
...@@ -60,7 +57,11 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps ...@@ -60,7 +57,11 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps
end end
end end
step 'page should not have content not containing "v1.0.0"' do step 'page should have "v1.0.0" in title' do
expect(page).to have_css 'title', text: 'Network · v1.0.0', visible: false
end
step 'page should only have content from "v1.0.0"' do
page.within '.network-graph' do page.within '.network-graph' do
expect(page).not_to have_content 'Change some files' expect(page).not_to have_content 'Change some files'
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