summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/pipeline/show.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/project/pipeline/show.rb')
-rw-r--r--qa/qa/page/project/pipeline/show.rb40
1 files changed, 23 insertions, 17 deletions
diff --git a/qa/qa/page/project/pipeline/show.rb b/qa/qa/page/project/pipeline/show.rb
index 6f4757a34e8..f499b748fb4 100644
--- a/qa/qa/page/project/pipeline/show.rb
+++ b/qa/qa/page/project/pipeline/show.rb
@@ -8,7 +8,7 @@ module QA
include Component::CiBadgeLink
view 'app/assets/javascripts/vue_shared/components/header_ci_component.vue' do
- element :pipeline_header
+ element :pipeline_header, required: true
end
view 'app/assets/javascripts/pipelines/components/graph/graph_component.vue' do
@@ -16,14 +16,14 @@ module QA
end
view 'app/assets/javascripts/pipelines/components/graph/job_item.vue' do
- element :job_item_container
- element :job_link
+ element :job_item_container, required: true
+ element :job_link, required: true
element :job_action_button
end
view 'app/assets/javascripts/pipelines/components/graph/linked_pipeline.vue' do
- element :expand_pipeline_button
- element :child_pipeline
+ element :expand_linked_pipeline_button
+ element :linked_pipeline_container
end
view 'app/assets/javascripts/reports/components/report_section.vue' do
@@ -73,14 +73,18 @@ module QA
end
end
- def has_child_pipeline?(title: nil)
- title ? find_child_pipeline_by_title(title) : has_element?(:child_pipeline)
+ def has_linked_pipeline?(title: nil)
+ title ? find_linked_pipeline_by_title(title) : has_element?(:linked_pipeline_container)
end
- def has_no_child_pipeline?
- has_no_element?(:child_pipeline)
+ alias_method :has_child_pipeline?, :has_linked_pipeline?
+
+ def has_no_linked_pipeline?
+ has_no_element?(:linked_pipeline_container)
end
+ alias_method :has_no_child_pipeline?, :has_no_linked_pipeline?
+
def click_job(job_name)
# Retry due to transient bug https://gitlab.com/gitlab-org/gitlab/-/issues/347126
QA::Support::Retrier.retry_on_exception do
@@ -88,22 +92,24 @@ module QA
end
end
- def child_pipelines
- all_elements(:child_pipeline, minimum: 1)
+ def linked_pipelines
+ all_elements(:linked_pipeline_container, minimum: 1)
end
- def find_child_pipeline_by_title(title)
- child_pipelines.find { |pipeline| pipeline[:title].include?(title) }
+ def find_linked_pipeline_by_title(title)
+ linked_pipelines.find { |pipeline| pipeline[:title].include?(title) }
end
- def expand_child_pipeline(title: nil)
- child_pipeline = title ? find_child_pipeline_by_title(title) : child_pipelines.first
+ def expand_linked_pipeline(title: nil)
+ linked_pipeline = title ? find_linked_pipeline_by_title(title) : linked_pipelines.first
- within_element_by_index(:child_pipeline, child_pipelines.index(child_pipeline)) do
- click_element(:expand_pipeline_button)
+ within_element_by_index(:linked_pipeline_container, linked_pipelines.index(linked_pipeline)) do
+ click_element(:expand_linked_pipeline_button)
end
end
+ alias_method :expand_child_pipeline, :expand_linked_pipeline
+
def expand_license_report
within_element(:license_report_widget) do
click_element(:expand_report_button)