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/vendor/jenkins/page/new_job.rb')
-rw-r--r--qa/qa/vendor/jenkins/page/new_job.rb38
1 files changed, 38 insertions, 0 deletions
diff --git a/qa/qa/vendor/jenkins/page/new_job.rb b/qa/qa/vendor/jenkins/page/new_job.rb
new file mode 100644
index 00000000000..11fa4ca8a53
--- /dev/null
+++ b/qa/qa/vendor/jenkins/page/new_job.rb
@@ -0,0 +1,38 @@
+# frozen_string_literal: true
+
+require 'capybara/dsl'
+
+module QA
+ module Vendor
+ module Jenkins
+ module Page
+ class NewJob < Page::Base
+ def initialize
+ @path = 'newJob'
+ end
+
+ def visit_and_create_new_job_with_name(new_job_name)
+ visit!
+ set_new_job_name(new_job_name)
+ click_free_style_project
+ click_ok
+ end
+
+ private
+
+ def set_new_job_name(new_job_name)
+ fill_in 'name', with: new_job_name
+ end
+
+ def click_free_style_project
+ find('.hudson_model_FreeStyleProject').click
+ end
+
+ def click_ok
+ click_on 'OK'
+ end
+ end
+ end
+ end
+ end
+end