Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-07-27 13:11:50 +0300
committerLin Jen-Shin <godfat@godfat.org>2016-07-27 13:11:50 +0300
commita1f08a76b5292795ae32a1ccb3cfc919a894daaf (patch)
tree2e18ab6560fa8108620cb3abac6460fda46b8971 /spec/features
parentd2b026f09288fd1abd3ad5dcf27816189c69c729 (diff)
parentf4804d5bb4b37f4de80e4a2e248f0958c615b618 (diff)
Merge remote-tracking branch 'upstream/master' into new-issue-by-email
* upstream/master: (38 commits) Remove useless new route Update gitlab-shell version to 3.2.1 in the 8.9->8.10 update guide Fix typo in Elixir CI template Add a spec for access_for_user_ids Fix typo in comment Rubocop offenses Optimize the invited group link access level check Incorporate review comments Optimize maximum user access level lookup in loading of notes Fix missing schema update for 20160722221922 Whitelist 'Simplified BSD' license Fix a bug where forking a project from a repository storage to another would fail Remove inline scripts from import pages. Make branches sortable without push permission (!5462) Profile requests when a header is passed Upgrade database_cleaner from 1.4.1 to 1.5.3. Show release notes in tag list Fix expand all diffs button in compare view Add route for Import::GithubController#new Update CHANGELOG ...
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/builds_spec.rb30
-rw-r--r--spec/features/projects/branches_spec.rb~HEAD32
2 files changed, 26 insertions, 36 deletions
diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb
index cab3dc1d167..0cfeb2e57d8 100644
--- a/spec/features/builds_spec.rb
+++ b/spec/features/builds_spec.rb
@@ -199,9 +199,13 @@ describe "Builds" do
click_link 'Retry'
end
- it { expect(page.status_code).to eq(200) }
- it { expect(page).to have_content 'pending' }
- it { expect(page).to have_content 'Cancel' }
+ it 'shows the right status and buttons' do
+ expect(page).to have_http_status(200)
+ expect(page).to have_content 'pending'
+ page.within('aside.right-sidebar') do
+ expect(page).to have_content 'Cancel'
+ end
+ end
end
context "Build from other project" do
@@ -212,7 +216,25 @@ describe "Builds" do
page.driver.post(retry_namespace_project_build_path(@project.namespace, @project, @build2))
end
- it { expect(page.status_code).to eq(404) }
+ it { expect(page).to have_http_status(404) }
+ end
+
+ context "Build that current user is not allowed to retry" do
+ before do
+ @build.run!
+ @build.cancel!
+ @project.update(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
+
+ logout_direct
+ login_with(create(:user))
+ visit namespace_project_build_path(@project.namespace, @project, @build)
+ end
+
+ it 'does not show the Retry button' do
+ page.within('aside.right-sidebar') do
+ expect(page).not_to have_content 'Retry'
+ end
+ end
end
end
diff --git a/spec/features/projects/branches_spec.rb~HEAD b/spec/features/projects/branches_spec.rb~HEAD
deleted file mode 100644
index 79abba21854..00000000000
--- a/spec/features/projects/branches_spec.rb~HEAD
+++ /dev/null
@@ -1,32 +0,0 @@
-require 'spec_helper'
-
-describe 'Branches', feature: true do
- let(:project) { create(:project) }
- let(:repository) { project.repository }
-
- before do
- login_as :user
- project.team << [@user, :developer]
- end
-
- describe 'Initial branches page' do
- it 'shows all the branches' do
- visit namespace_project_branches_path(project.namespace, project)
-
- repository.branches { |branch| expect(page).to have_content("#{branch.name}") }
- expect(page).to have_content("Protected branches can be managed in project settings")
- end
- end
-
- describe 'Find branches' do
- it 'shows filtered branches', js: true do
- visit namespace_project_branches_path(project.namespace, project, project.id)
-
- fill_in 'branch-search', with: 'fix'
- find('#branch-search').native.send_keys(:enter)
-
- expect(page).to have_content('fix')
- expect(find('.all-branches')).to have_selector('li', count: 1)
- end
- end
-end