summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-27 18:09:04 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-27 18:09:04 +0000
commit390582e118752426acf5cb25ec99103d312d891c (patch)
treebb0b1a6a46632024ffc3ba1983e4ebcb0fab4428 /qa
parent1ea1db491c8bc90789acda45c9002aaa5c4dc498 (diff)
downloadgitlab-ce-390582e118752426acf5cb25ec99103d312d891c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/resource/user.rb13
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb3
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb3
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb3
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb3
5 files changed, 15 insertions, 10 deletions
diff --git a/qa/qa/resource/user.rb b/qa/qa/resource/user.rb
index 9544a3e80b3..e6dbe3faa61 100644
--- a/qa/qa/resource/user.rb
+++ b/qa/qa/resource/user.rb
@@ -35,14 +35,17 @@ module QA
end
def email
- @email ||= "#{username}@example.com"
+ @email ||= begin
+ api_email = api_resource&.dig(:email)
+ api_email && !api_email.empty? ? api_email : "#{username}@example.com"
+ end
end
def public_email
@public_email ||= begin
api_public_email = api_resource&.dig(:public_email)
- api_public_email && api_public_email != '' ? api_public_email : Runtime::User.default_email
+ api_public_email && !api_public_email.empty? ? api_public_email : Runtime::User.default_email
end
end
@@ -87,6 +90,8 @@ module QA
end
def api_get_path
+ return "/user" if fetching_own_data?
+
"/users/#{fetch_id(username)}"
end
@@ -136,6 +141,10 @@ module QA
users.first[:id]
end
+
+ def fetching_own_data?
+ user&.username == username || Runtime::User.username == username
+ end
end
end
end
diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb
index d85929ebbca..409d67d51b1 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb
@@ -1,8 +1,7 @@
# frozen_string_literal: true
module QA
- # BUG_IN_CODE
- context 'Manage', :github, quarantine: 'https://gitlab.com/gitlab-org/gitlab/issues/26952' do
+ context 'Manage', :github, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/issues/26952', type: :bug } do
describe 'Project import from GitHub' do
let(:imported_project) do
Resource::ProjectImportedFromGithub.fabricate! do |project|
diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb
index ff995fc1e0c..6ebe3e0b620 100644
--- a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb
@@ -1,8 +1,7 @@
# frozen_string_literal: true
module QA
- # BUG_IN_CODE
- context 'Create', quarantine: 'https://gitlab.com/gitlab-org/gitlab/issues/36817' do
+ context 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/issues/36817', type: :bug } do
describe 'Merge request rebasing' do
it 'user rebases source branch of merge request' do
Flow::Login.sign_in
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb
index f3edd822ef7..ff0f212c289 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb
@@ -2,8 +2,7 @@
module QA
# Git protocol v2 is temporarily disabled
- # BUG_IN_CODE
- context 'Create', quarantine: 'https://gitlab.com/gitlab-org/gitlab/issues/27828' do
+ context 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/issues/27828', type: :bug } do
describe 'Push over HTTP using Git protocol version 2', :requires_git_protocol_v2 do
it 'user pushes to the repository' do
Flow::Login.sign_in
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb
index 3362404e11b..0e8b8203c34 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb
@@ -2,8 +2,7 @@
module QA
# Git protocol v2 is temporarily disabled
- # BUG_IN_CODE
- context 'Create', quarantine: 'https://gitlab.com/gitlab-org/gitlab/issues/27828' do
+ context 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/issues/27828', type: :bug } do
describe 'Push over SSH using Git protocol version 2', :requires_git_protocol_v2 do
# Note: If you run this test against GDK make sure you've enabled sshd and
# enabled setting the Git protocol by adding `AcceptEnv GIT_PROTOCOL` to