diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-02-04 23:38:59 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-04 23:38:59 +0100 |
commit | 3366f377c1d4cbb02ecc5a2e47b059ed375c5e09 (patch) | |
tree | 6a19813b4820ad6d2813bf86b30d8e5be2bd10c6 /qa/qa/factory/resource/issue.rb | |
parent | 0abce36cd20cdd3579138bee835d28519a5593f2 (diff) | |
parent | cf887a8b3108edb715ee5618377f4ffab1824d85 (diff) | |
download | gitlab-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.rb | 32 |
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 |