Commit 67dc1184 authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'rename-child-to-linked-pipeline' into 'master'

Rename child_pipeline to linked_pipeline

See merge request gitlab-org/gitlab!83792
parents 13a7ea6f ee6f1308
......@@ -133,7 +133,7 @@ export default {
class="gl-h-full gl-display-flex! gl-border-solid gl-border-gray-100 gl-border-1"
:class="flexDirection"
:title="tooltipText"
data-qa-selector="child_pipeline"
data-qa-selector="linked_pipeline_container"
@mouseover="onDownstreamHovered"
@mouseleave="onDownstreamHoverLeave"
>
......@@ -171,7 +171,7 @@ export default {
:icon="expandedIcon"
:aria-label="__('Expand pipeline')"
data-testid="expand-pipeline-button"
data-qa-selector="expand_pipeline_button"
data-qa-selector="expand_linked_pipeline_button"
@click="onClickLinkedPipeline"
/>
</div>
......
......@@ -22,8 +22,8 @@ module QA
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)
......
......@@ -44,8 +44,8 @@ module QA
it 'runs the pipeline with composed config', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/348088' do
Page::Project::Pipeline::Show.perform do |parent_pipeline|
Support::Waiter.wait_until { parent_pipeline.has_child_pipeline? }
parent_pipeline.expand_child_pipeline
Support::Waiter.wait_until { parent_pipeline.has_linked_pipeline? }
parent_pipeline.expand_linked_pipeline
parent_pipeline.click_job('downstream_test')
end
......
......@@ -48,7 +48,7 @@ module QA
expect(show).to have_passed
expect(show).not_to have_job(downstream_job_name)
show.expand_child_pipeline
show.expand_linked_pipeline
expect(show).to have_job(downstream_job_name)
end
......
......@@ -10,6 +10,7 @@ module QA
file_content
assignee
child_pipeline
linked_pipeline
content
design
file
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment