gitlab-org--gitlab-foss/features/steps/project/project_network_graph.rb

92 lines
2.2 KiB
Ruby
Raw Normal View History

class ProjectNetworkGraph < Spinach::FeatureSteps
2012-09-10 11:35:03 -04:00
include SharedAuthentication
include SharedProject
Then 'page should have network graph' do
page.should have_content "Project Network Graph"
2013-03-04 03:50:42 -05:00
page.should have_selector ".graph"
end
2013-03-04 03:50:42 -05:00
When 'I visit project "Shop" network page' do
# Stub Graph max_size to speed up test (10 commits vs. 650)
Network::Graph.stub(max_count: 10)
project = Project.find_by_name("Shop")
visit project_network_path(project, "master")
end
2013-03-04 03:50:42 -05:00
And 'page should select "master" in select box' do
page.should have_selector '#ref_chzn span', text: "master"
2013-03-04 03:50:42 -05:00
end
2013-04-14 05:15:35 -04:00
And 'page should select "v2.1.0" in select box' do
page.should have_selector '#ref_chzn span', text: "v2.1.0"
end
2013-03-04 03:50:42 -05:00
And 'page should have "master" on graph' do
within '.graph' do
page.should have_content 'master'
end
end
When 'I switch ref to "stable"' do
page.select 'stable', from: 'ref'
sleep 2
2013-03-04 03:50:42 -05:00
end
When 'I switch ref to "v2.1.0"' do
page.select 'v2.1.0', from: 'ref'
sleep 2
end
2013-04-14 05:15:35 -04:00
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
2013-03-04 03:50:42 -05:00
And 'page should select "stable" in select box' do
page.should have_selector '#ref_chzn span', text: "stable"
2013-03-04 03:50:42 -05:00
end
And 'page should select "v2.1.0" in select box' do
page.should have_selector '#ref_chzn span', text: "v2.1.0"
end
2013-03-04 03:50:42 -05:00
And 'page should have "stable" on graph' do
within '.graph' do
page.should have_content 'stable'
end
end
When 'I looking for a commit by SHA of "v2.1.0"' do
2013-03-04 03:50:42 -05:00
within ".content .search" do
fill_in 'q', with: '98d6492'
2013-03-04 03:50:42 -05:00
find('button').click
end
sleep 2
2013-03-04 03:50:42 -05:00
end
And 'page should have "v2.1.0" on graph' do
within '.graph' do
page.should have_content 'v2.1.0'
end
end
end