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:
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)