summaryrefslogtreecommitdiff
path: root/qa/qa/factory/resource/issue.rb
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-02-04 23:38:59 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-02-04 23:38:59 +0100
commit3366f377c1d4cbb02ecc5a2e47b059ed375c5e09 (patch)
tree6a19813b4820ad6d2813bf86b30d8e5be2bd10c6 /qa/qa/factory/resource/issue.rb
parent0abce36cd20cdd3579138bee835d28519a5593f2 (diff)
parentcf887a8b3108edb715ee5618377f4ffab1824d85 (diff)
downloadgitlab-ce-3366f377c1d4cbb02ecc5a2e47b059ed375c5e09.tar.gz
Merge branch 'master' into 38265-stuckcijobsworker-wrongly-detects-cancels-stuck-builds-when-per-job-timeout-is-more-than-an-hour
Diffstat (limited to 'qa/qa/factory/resource/issue.rb')
-rw-r--r--qa/qa/factory/resource/issue.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/qa/qa/factory/resource/issue.rb b/qa/qa/factory/resource/issue.rb
new file mode 100644
index 00000000000..95f48e20b3e
--- /dev/null
+++ b/qa/qa/factory/resource/issue.rb
@@ -0,0 +1,32 @@
+module QA
+ module Factory
+ module Resource
+ class Issue < Factory::Base
+ attr_writer :title, :description, :project
+
+ dependency Factory::Resource::Project, as: :project do |project|
+ project.name = 'project-for-issues'
+ project.description = 'project for adding issues'
+ end
+
+ product :title do
+ Page::Project::Issue::Show.act { issue_title }
+ end
+
+ def fabricate!
+ project.visit!
+
+ Page::Project::Show.act do
+ go_to_new_issue
+ end
+
+ Page::Project::Issue::New.perform do |page|
+ page.add_title(@title)
+ page.add_description(@description)
+ page.create_new_issue
+ end
+ end
+ end
+ end
+ end
+end