summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-20 06:06:19 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-20 06:06:19 +0000
commit7e20809103e1f9c0c96c3a96705224c81bf448d5 (patch)
treeafc4e940a8b9e865aa95d406f2c52f47c232a8fd /qa
parenta264dc20c7b1f9bf7863a2a8048324d28aafaac0 (diff)
downloadgitlab-ce-7e20809103e1f9c0c96c3a96705224c81bf448d5.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/base.rb4
-rw-r--r--qa/qa/resource/issue.rb11
-rw-r--r--qa/qa/support/page/logging.rb3
3 files changed, 11 insertions, 7 deletions
diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb
index 42fe431bfbd..104c9b19e2a 100644
--- a/qa/qa/page/base.rb
+++ b/qa/qa/page/base.rb
@@ -94,8 +94,8 @@ module QA
end
# replace with (..., page = self.class)
- def click_element(name, page = nil)
- find_element(name).click
+ def click_element(name, page = nil, text: nil)
+ find_element(name, text: nil).click
page.validate_elements_present! if page
end
diff --git a/qa/qa/resource/issue.rb b/qa/qa/resource/issue.rb
index 2cbfab3b413..9d0a5e159e0 100644
--- a/qa/qa/resource/issue.rb
+++ b/qa/qa/resource/issue.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require 'securerandom'
+
module QA
module Resource
class Issue < Base
@@ -20,6 +22,7 @@ module QA
def initialize
@assignee_ids = []
@labels = []
+ @title = "Issue title #{SecureRandom.hex(8)}"
end
def fabricate!
@@ -27,10 +30,10 @@ module QA
Page::Project::Show.perform(&:go_to_new_issue)
- Page::Project::Issue::New.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.add_title(@title)
- page.add_description(@description)
- page.create_new_issue
+ Page::Project::Issue::New.perform do |new_page|
+ new_page.add_title(@title)
+ new_page.add_description(@description)
+ new_page.create_new_issue
end
end
diff --git a/qa/qa/support/page/logging.rb b/qa/qa/support/page/logging.rb
index 606e8d7be93..6b6e12f86de 100644
--- a/qa/qa/support/page/logging.rb
+++ b/qa/qa/support/page/logging.rb
@@ -59,9 +59,10 @@ module QA
elements
end
- def click_element(name, page = nil)
+ def click_element(name, page = nil, **kwargs)
msg = ["clicking :#{name}"]
msg << ", expecting to be at #{page.class}" if page
+ msg << "with args #{kwargs}"
log(msg.compact.join(' '))