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/page/project/pipeline/new.rb')
-rw-r--r--qa/qa/page/project/pipeline/new.rb28
1 files changed, 27 insertions, 1 deletions
diff --git a/qa/qa/page/project/pipeline/new.rb b/qa/qa/page/project/pipeline/new.rb
index 742fcad5c07..1d85d072e34 100644
--- a/qa/qa/page/project/pipeline/new.rb
+++ b/qa/qa/page/project/pipeline/new.rb
@@ -5,23 +5,49 @@ module QA
module Project
module Pipeline
class New < QA::Page::Base
- view 'app/assets/javascripts/pipeline_new/components/legacy_pipeline_new_form.vue' do
+ view 'app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue' do
element :run_pipeline_button, required: true
element :ci_variable_row_container
element :ci_variable_key_field
element :ci_variable_value_field
+ element :ci_variable_value_dropdown
+ element :ci_variable_value_dropdown_item
end
def click_run_pipeline_button
click_element(:run_pipeline_button, Page::Project::Pipeline::Show)
end
+ def click_variable_dropdown
+ return unless has_variable_dropdown?
+
+ click_element(:ci_variable_value_dropdown)
+ end
+
def configure_variable(key: nil, value: 'foo', row_index: 0)
within_element_by_index(:ci_variable_row_container, row_index) do
fill_element(:ci_variable_key_field, key) unless key.nil?
fill_element(:ci_variable_value_field, value)
end
end
+
+ def has_variable_dropdown?
+ has_element?(:ci_variable_value_dropdown)
+ end
+
+ def variable_dropdown
+ return unless has_variable_dropdown?
+
+ find_element(:ci_variable_value_dropdown)
+ end
+
+ def variable_dropdown_item_with_index(index)
+ return unless has_variable_dropdown?
+
+ within_element_by_index(:ci_variable_value_dropdown_item, index) do
+ find('p')
+ end
+ end
end
end
end