diff options
Diffstat (limited to 'qa/qa/page/project/pipeline')
-rw-r--r-- | qa/qa/page/project/pipeline/index.rb | 7 | ||||
-rw-r--r-- | qa/qa/page/project/pipeline/show.rb | 20 |
2 files changed, 20 insertions, 7 deletions
diff --git a/qa/qa/page/project/pipeline/index.rb b/qa/qa/page/project/pipeline/index.rb index 0f5a7e8c801..3cb466abce9 100644 --- a/qa/qa/page/project/pipeline/index.rb +++ b/qa/qa/page/project/pipeline/index.rb @@ -9,8 +9,11 @@ module QA element :pipeline_url_link end - view 'app/assets/javascripts/pipelines/components/pipelines_list/pipelines_table_row.vue' do + view 'app/assets/javascripts/pipelines/components/pipelines_list/pipelines_status_badge.vue' do element :pipeline_commit_status + end + + view 'app/assets/javascripts/pipelines/components/pipelines_list/pipeline_operations.vue' do element :pipeline_retry_button end @@ -31,7 +34,7 @@ module QA end def wait_for_latest_pipeline_status - wait_until(max_duration: 30, reload: true, sleep_interval: 5) { has_pipeline? } + wait_until(max_duration: 90, reload: true, sleep_interval: 5) { has_pipeline? } wait_until(reload: false, max_duration: 360) do within_element_by_index(:pipeline_commit_status, 0) { yield } diff --git a/qa/qa/page/project/pipeline/show.rb b/qa/qa/page/project/pipeline/show.rb index 994b1c02a3d..c5887b84be6 100644 --- a/qa/qa/page/project/pipeline/show.rb +++ b/qa/qa/page/project/pipeline/show.rb @@ -68,20 +68,30 @@ module QA end end - def has_child_pipeline? - has_element? :child_pipeline + def has_child_pipeline?(title: nil) + title ? find_child_pipeline_by_title(title) : has_element?(:child_pipeline) end def has_no_child_pipeline? - has_no_element? :child_pipeline + has_no_element?(:child_pipeline) end def click_job(job_name) click_element(:job_link, Project::Job::Show, text: job_name) end - def expand_child_pipeline - within_element(:child_pipeline) do + def child_pipelines + all_elements(:child_pipeline, minimum: 1) + end + + def find_child_pipeline_by_title(title) + child_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 + + within_element_by_index(:child_pipeline, child_pipelines.index(child_pipeline)) do click_element(:expand_pipeline_button) end end |