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 { ...@@ -133,7 +133,7 @@ export default {
class="gl-h-full gl-display-flex! gl-border-solid gl-border-gray-100 gl-border-1" class="gl-h-full gl-display-flex! gl-border-solid gl-border-gray-100 gl-border-1"
:class="flexDirection" :class="flexDirection"
:title="tooltipText" :title="tooltipText"
data-qa-selector="child_pipeline" data-qa-selector="linked_pipeline_container"
@mouseover="onDownstreamHovered" @mouseover="onDownstreamHovered"
@mouseleave="onDownstreamHoverLeave" @mouseleave="onDownstreamHoverLeave"
> >
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
:icon="expandedIcon" :icon="expandedIcon"
:aria-label="__('Expand pipeline')" :aria-label="__('Expand pipeline')"
data-testid="expand-pipeline-button" data-testid="expand-pipeline-button"
data-qa-selector="expand_pipeline_button" data-qa-selector="expand_linked_pipeline_button"
@click="onClickLinkedPipeline" @click="onClickLinkedPipeline"
/> />
</div> </div>
......
...@@ -22,8 +22,8 @@ module QA ...@@ -22,8 +22,8 @@ module QA
end end
view 'app/assets/javascripts/pipelines/components/graph/linked_pipeline.vue' do view 'app/assets/javascripts/pipelines/components/graph/linked_pipeline.vue' do
element :expand_pipeline_button element :expand_linked_pipeline_button
element :child_pipeline element :linked_pipeline_container
end end
view 'app/assets/javascripts/reports/components/report_section.vue' do view 'app/assets/javascripts/reports/components/report_section.vue' do
...@@ -73,14 +73,18 @@ module QA ...@@ -73,14 +73,18 @@ module QA
end end
end end
def has_child_pipeline?(title: nil) def has_linked_pipeline?(title: nil)
title ? find_child_pipeline_by_title(title) : has_element?(:child_pipeline) title ? find_linked_pipeline_by_title(title) : has_element?(:linked_pipeline_container)
end end
def has_no_child_pipeline? alias_method :has_child_pipeline?, :has_linked_pipeline?
has_no_element?(:child_pipeline)
def has_no_linked_pipeline?
has_no_element?(:linked_pipeline_container)
end end
alias_method :has_no_child_pipeline?, :has_no_linked_pipeline?
def click_job(job_name) def click_job(job_name)
# Retry due to transient bug https://gitlab.com/gitlab-org/gitlab/-/issues/347126 # Retry due to transient bug https://gitlab.com/gitlab-org/gitlab/-/issues/347126
QA::Support::Retrier.retry_on_exception do QA::Support::Retrier.retry_on_exception do
...@@ -88,22 +92,24 @@ module QA ...@@ -88,22 +92,24 @@ module QA
end end
end end
def child_pipelines def linked_pipelines
all_elements(:child_pipeline, minimum: 1) all_elements(:linked_pipeline_container, minimum: 1)
end end
def find_child_pipeline_by_title(title) def find_linked_pipeline_by_title(title)
child_pipelines.find { |pipeline| pipeline[:title].include?(title) } linked_pipelines.find { |pipeline| pipeline[:title].include?(title) }
end end
def expand_child_pipeline(title: nil) def expand_linked_pipeline(title: nil)
child_pipeline = title ? find_child_pipeline_by_title(title) : child_pipelines.first linked_pipeline = title ? find_linked_pipeline_by_title(title) : linked_pipelines.first
within_element_by_index(:child_pipeline, child_pipelines.index(child_pipeline)) do within_element_by_index(:linked_pipeline_container, linked_pipelines.index(linked_pipeline)) do
click_element(:expand_pipeline_button) click_element(:expand_linked_pipeline_button)
end end
end end
alias_method :expand_child_pipeline, :expand_linked_pipeline
def expand_license_report def expand_license_report
within_element(:license_report_widget) do within_element(:license_report_widget) do
click_element(:expand_report_button) click_element(:expand_report_button)
......
...@@ -44,8 +44,8 @@ module QA ...@@ -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 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| Page::Project::Pipeline::Show.perform do |parent_pipeline|
Support::Waiter.wait_until { parent_pipeline.has_child_pipeline? } Support::Waiter.wait_until { parent_pipeline.has_linked_pipeline? }
parent_pipeline.expand_child_pipeline parent_pipeline.expand_linked_pipeline
parent_pipeline.click_job('downstream_test') parent_pipeline.click_job('downstream_test')
end end
......
...@@ -48,7 +48,7 @@ module QA ...@@ -48,7 +48,7 @@ module QA
expect(show).to have_passed expect(show).to have_passed
expect(show).not_to have_job(downstream_job_name) 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) expect(show).to have_job(downstream_job_name)
end end
......
...@@ -10,6 +10,7 @@ module QA ...@@ -10,6 +10,7 @@ module QA
file_content file_content
assignee assignee
child_pipeline child_pipeline
linked_pipeline
content content
design design
file 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