From df2bb60f90315a77718b9122e9d06f5655750640 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 14 Jul 2015 15:20:38 -0700 Subject: Add support for destroying project milestones Closes https://github.com/gitlabhq/gitlabhq/issues/1504 --- features/project/issues/milestones.feature | 4 ++++ features/steps/project/issues/milestones.rb | 8 ++++++++ 2 files changed, 12 insertions(+) (limited to 'features') diff --git a/features/project/issues/milestones.feature b/features/project/issues/milestones.feature index 9ac65b1257c..bfbaaec5a35 100644 --- a/features/project/issues/milestones.feature +++ b/features/project/issues/milestones.feature @@ -17,6 +17,10 @@ Feature: Project Issues Milestones And I submit new milestone "v2.3" Then I should see milestone "v2.3" + Scenario: I delete new milestone + Given I click link to remove milestone "v2.2" + And I should see no milestones + @javascript Scenario: Listing closed issues Given the milestone has open and closed issues diff --git a/features/steps/project/issues/milestones.rb b/features/steps/project/issues/milestones.rb index 708c5243947..61e62c2adbd 100644 --- a/features/steps/project/issues/milestones.rb +++ b/features/steps/project/issues/milestones.rb @@ -56,4 +56,12 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps step 'I should see 3 issues' do expect(page).to have_selector('#tab-issues li.issue-row', count: 4) end + + step 'I click link to remove milestone "v2.2"' do + click_link 'Remove' + end + + step 'I should see no milestones' do + expect(page).to have_content('No milestones to show') + end end -- cgit v1.2.1 From 70a3c165a9f3882a82cf8946a783ace091635797 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Thu, 2 Jul 2015 16:33:38 +0200 Subject: Allow custom label to be set for authentication providers. --- features/steps/admin/users.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'features') diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb index 6c4b91586d6..49e64eeff71 100644 --- a/features/steps/admin/users.rb +++ b/features/steps/admin/users.rb @@ -3,6 +3,14 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps include SharedPaths include SharedAdmin + before do + allow(Devise).to receive(:omniauth_providers).and_return([:twitter, :twitter_updated]) + end + + after do + allow(Devise).to receive(:omniauth_providers).and_call_original + end + step 'I should see all users' do User.all.each do |user| expect(page).to have_content user.name @@ -121,7 +129,6 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps end step 'I visit "Pete" identities page in admin' do - allow(Gitlab::OAuth::Provider).to receive(:names).and_return(%w(twitter twitter_updated)) visit admin_user_identities_path(@user) end -- cgit v1.2.1 From 562242cb9dc11f0a5957a58eb9f91a484a909b40 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 26 Jul 2015 02:17:34 -0700 Subject: Fix commit data retrieval when branch name has single quotes Closes #1724 --- features/project/source/browse_files.feature | 7 +++++++ features/steps/project/source/browse_files.rb | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) (limited to 'features') diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature index af68cb96ed9..d3a77466a35 100644 --- a/features/project/source/browse_files.feature +++ b/features/project/source/browse_files.feature @@ -158,3 +158,10 @@ Feature: Project Source Browse Files Given I visit project source page for "6d394385cf567f80a8fd85055db1ab4c5295806f" And I click on ".gitignore" file in repo Then I don't see the permalink link + + @javascript + Scenario: I browse code with single quotes in the ref + Given I switch ref to 'test' + And I see the ref 'test' has been selected + And I visit the 'test' tree + Then I see the commit data diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb index 95879b9544d..5cb085db207 100644 --- a/features/steps/project/source/browse_files.rb +++ b/features/steps/project/source/browse_files.rb @@ -193,6 +193,23 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps FileUtils.rm_f(File.join(@project.repository.path, 'hooks', 'pre-receive')) end + step "I switch ref to 'test'" do + select "'test'", from: 'ref' + end + + step "I see the ref 'test' has been selected" do + expect(page).to have_selector '.select2-chosen', text: "'test'" + end + + step "I visit the 'test' tree" do + visit namespace_project_tree_path(@project.namespace, @project, "'test'") + end + + step 'I see the commit data' do + expect(page).to have_css('.tree-commit-link', visible: true) + expect(page).not_to have_content('Loading commit data...') + end + private def set_new_content -- cgit v1.2.1 From 369275d63074e5d526c0d1cf404b4a3742bb1e6a Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 28 Jul 2015 18:15:23 -0700 Subject: Fix network graph when branch name has single quotes Closes https://github.com/gitlabhq/gitlabhq/issues/9500 --- features/project/network_graph.feature | 5 +++++ features/steps/project/network_graph.rb | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'features') 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 @@ -10,6 +10,11 @@ Feature: Project Network Graph And page should select "master" in select box 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" 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 -- cgit v1.2.1