summaryrefslogtreecommitdiff
path: root/qa/qa/resource/user.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /qa/qa/resource/user.rb
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
downloadgitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'qa/qa/resource/user.rb')
-rw-r--r--qa/qa/resource/user.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/qa/qa/resource/user.rb b/qa/qa/resource/user.rb
index 9768fc154a7..5cd4147e154 100644
--- a/qa/qa/resource/user.rb
+++ b/qa/qa/resource/user.rb
@@ -11,6 +11,8 @@ module QA
attribute :id
attribute :name
+ attribute :first_name
+ attribute :last_name
attribute :email
def initialize
@@ -34,6 +36,14 @@ module QA
@name ||= api_resource&.dig(:name) || "QA User #{unique_id}"
end
+ def first_name
+ name.split(' ').first
+ end
+
+ def last_name
+ name.split(' ').drop(1).join(' ')
+ end
+
def email
@email ||= begin
api_email = api_resource&.dig(:email)