diff options
author | Ciro Santillli <ciro.santilli@gmail.com> | 2014-02-23 10:04:56 +0100 |
---|---|---|
committer | Ciro Santillli <ciro.santilli@gmail.com> | 2014-02-23 10:34:39 +0100 |
commit | 170340e6b15f91e79cf683c892ec887c3115b317 (patch) | |
tree | 19cf1f82b08201295b3e66170a967e813c522189 /features/steps/project/network_graph.rb | |
parent | e868de687da060a109bd67fd492ed110eb134d47 (diff) | |
download | gitlab-ce-170340e6b15f91e79cf683c892ec887c3115b317.tar.gz |
Remove dir prefix and suffix from tests inside dir.
Diffstat (limited to 'features/steps/project/network_graph.rb')
-rw-r--r-- | features/steps/project/network_graph.rb | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/features/steps/project/network_graph.rb b/features/steps/project/network_graph.rb new file mode 100644 index 00000000000..1c5cfcc6c68 --- /dev/null +++ b/features/steps/project/network_graph.rb @@ -0,0 +1,93 @@ +class ProjectNetworkGraph < Spinach::FeatureSteps + include SharedAuthentication + include SharedPaths + include SharedProject + + Then 'page should have network graph' do + page.should have_selector ".network-graph" + end + + 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 + + And 'page should select "master" in select box' do + page.should have_selector '.select2-chosen', text: "master" + end + + And 'page should select "v2.1.0" in select box' do + page.should have_selector '.select2-chosen', text: "v2.1.0" + end + + And 'page should have "master" on graph' do + within '.network-graph' do + page.should have_content 'master' + end + end + + When 'I switch ref to "stable"' do + page.select 'stable', from: 'ref' + 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 containing "v2.1.0"' do + within '.network-graph' do + page.should have_content 'cleaning' + end + end + + Then 'page should not have content not containing "v2.1.0"' do + within '.network-graph' do + page.should_not have_content 'cleaning' + end + end + + And 'page should select "stable" in select box' do + page.should have_selector '.select2-chosen', text: "stable" + end + + And 'page should select "v2.1.0" in select box' do + page.should have_selector '.select2-chosen', text: "v2.1.0" + end + + And 'page should have "stable" on graph' do + within '.network-graph' do + page.should have_content 'stable' + end + end + + When 'I looking for a commit by SHA of "v2.1.0"' do + within ".network-form" do + fill_in 'extended_sha1', with: '98d6492' + find('button').click + end + sleep 2 + end + + And 'page should have "v2.1.0" on graph' do + within '.network-graph' do + page.should have_content 'v2.1.0' + end + end + + When 'I look for a commit by ";"' do + within ".network-form" do + fill_in 'extended_sha1', with: ';' + find('button').click + end + end +end |