summaryrefslogtreecommitdiff
path: root/features/steps
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-04-17 12:58:51 +0000
committerRémy Coutable <remy@rymai.me>2018-04-17 12:58:51 +0000
commitd26d4f9e33e3ed33bd32acb8c459c249ea1db2bc (patch)
tree27a05483aed2c5c5ea47061371a81d40ba7bf4ae /features/steps
parente86923ebac273fd0d542090300a6ffb0f0ea4136 (diff)
parenteafa1b9fe375517abfa529b78e2dd4229ac76d04 (diff)
downloadgitlab-ce-d26d4f9e33e3ed33bd32acb8c459c249ea1db2bc.tar.gz
Merge branch 'replace-build-permissions' into 'master'
Replace project builds permissions spinach with RSpec See merge request gitlab-org/gitlab-ce!18306
Diffstat (limited to 'features/steps')
-rw-r--r--features/steps/project/builds/permissions.rb7
-rw-r--r--features/steps/shared/builds.rb25
-rw-r--r--features/steps/shared/paths.rb8
-rw-r--r--features/steps/shared/project.rb29
4 files changed, 0 insertions, 69 deletions
diff --git a/features/steps/project/builds/permissions.rb b/features/steps/project/builds/permissions.rb
deleted file mode 100644
index 6e9d6504fd5..00000000000
--- a/features/steps/project/builds/permissions.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-class Spinach::Features::ProjectBuildsPermissions < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedProject
- include SharedBuilds
- include SharedPaths
- include RepoHelpers
-end
diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb
index f5950145348..c2197584d8d 100644
--- a/features/steps/shared/builds.rb
+++ b/features/steps/shared/builds.rb
@@ -30,10 +30,6 @@ module SharedBuilds
visit project_job_path(@project, @build)
end
- step 'I visit project builds page' do
- visit project_jobs_path(@project)
- end
-
step 'recent build has artifacts available' do
artifacts = Rails.root + 'spec/fixtures/ci_build_artifacts.zip'
archive = fixture_file_upload(artifacts, 'application/zip')
@@ -54,25 +50,4 @@ module SharedBuilds
expect(page.response_headers['Content-Type']).to eq 'application/zip'
expect(page.response_headers['Content-Transfer-Encoding']).to eq 'binary'
end
-
- step 'I access artifacts download page' do
- visit download_project_job_artifacts_path(@project, @build)
- end
-
- step 'I see details of a build' do
- expect(page).to have_content "Job ##{@build.id}"
- end
-
- step 'I see build trace' do
- expect(page).to have_css '#build-trace'
- end
-
- step 'I see the build' do
- page.within('.build') do
- expect(page).to have_content "##{@build.id}"
- expect(page).to have_content @build.sha[0..7]
- expect(page).to have_content @build.ref
- expect(page).to have_content @build.name
- end
- end
end
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index 3b4c839bcef..d16c127f6e6 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -435,12 +435,4 @@ module SharedPaths
mr = MergeRequest.find_by(title: title)
project_merge_request_path(mr.target_project, mr)
end
-
- # ----------------------------------------
- # Errors
- # ----------------------------------------
-
- step 'page status code should be 404' do
- expect(status_code).to eq 404
- end
end
diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb
index 09969a6473f..a1945cf5f3d 100644
--- a/features/steps/shared/project.rb
+++ b/features/steps/shared/project.rb
@@ -13,11 +13,6 @@ module SharedProject
@project.add_master(@user)
end
- step "project exists in some group namespace" do
- @group = create(:group, name: 'some group')
- @project = create(:project, :repository, namespace: @group, public_builds: false)
- end
-
# Create a specific project called "Shop"
step 'I own project "Shop"' do
@project = Project.find_by(name: "Shop")
@@ -30,18 +25,6 @@ module SharedProject
end
# ----------------------------------------
- # Project permissions
- # ----------------------------------------
-
- step 'I am member of a project with a guest role' do
- @project.add_guest(@user)
- end
-
- step 'I am member of a project with a reporter role' do
- @project.add_reporter(@user)
- end
-
- # ----------------------------------------
# Visibility of archived project
# ----------------------------------------
@@ -140,18 +123,6 @@ module SharedProject
create(:label, project: project, title: 'enhancement')
end
- step 'The project is internal' do
- @project.update(visibility_level: Gitlab::VisibilityLevel::INTERNAL)
- end
-
- step 'public access for builds is enabled' do
- @project.update(public_builds: true)
- end
-
- step 'public access for builds is disabled' do
- @project.update(public_builds: false)
- end
-
def user_owns_project(user_name:, project_name:, visibility: :private)
user = user_exists(user_name, username: user_name.gsub(/\s/, '').underscore)
project = Project.find_by(name: project_name)