diff options
author | Stan Hu <stanhu@gmail.com> | 2015-07-28 18:15:23 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-07-29 23:29:47 -0700 |
commit | 369275d63074e5d526c0d1cf404b4a3742bb1e6a (patch) | |
tree | b3db5a7cda290c5279f452322dd1b314c2ea893d /features | |
parent | 82f0d3e655c48fc67adea88af681d0b5d81810de (diff) | |
download | gitlab-ce-369275d63074e5d526c0d1cf404b4a3742bb1e6a.tar.gz |
Fix network graph when branch name has single quotes
Closes https://github.com/gitlabhq/gitlabhq/issues/9500
Diffstat (limited to 'features')
-rw-r--r-- | features/project/network_graph.feature | 5 | ||||
-rw-r--r-- | features/steps/project/network_graph.rb | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/features/project/network_graph.feature b/features/project/network_graph.feature index 8beb6043aff..6cc89a15a78 100644 --- a/features/project/network_graph.feature +++ b/features/project/network_graph.feature @@ -11,6 +11,11 @@ Feature: Project Network Graph And page should have "master" on graph @javascript + Scenario: I should see project network with 'test' branch + When I visit project network page on branch 'test' + Then page should have 'test' on graph + + @javascript Scenario: I should switch "branch" and "tag" When I switch ref to "feature" Then page should select "feature" in select box diff --git a/features/steps/project/network_graph.rb b/features/steps/project/network_graph.rb index 992cf2734fd..7a83d32a240 100644 --- a/features/steps/project/network_graph.rb +++ b/features/steps/project/network_graph.rb @@ -11,8 +11,12 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps # 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 namespace_project_network_path(project.namespace, project, "master") + @project = Project.find_by(name: "Shop") + visit namespace_project_network_path(@project.namespace, @project, "master") + end + + step "I visit project network page on branch 'test'" do + visit namespace_project_network_path(@project.namespace, @project, "'test'") end step 'page should select "master" in select box' do @@ -29,6 +33,12 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps end end + step "page should have 'test' on graph" do + page.within '.network-graph' do + expect(page).to have_content "'test'" + end + end + When 'I switch ref to "feature"' do select 'feature', from: 'ref' sleep 2 |