diff options
Diffstat (limited to 'qa/qa/flow/pipeline.rb')
-rw-r--r-- | qa/qa/flow/pipeline.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qa/qa/flow/pipeline.rb b/qa/qa/flow/pipeline.rb index ff23907c081..999f352e834 100644 --- a/qa/qa/flow/pipeline.rb +++ b/qa/qa/flow/pipeline.rb @@ -6,12 +6,17 @@ module QA module_function # In some cases we don't need to wait for anything, blocked, running or pending is acceptable - # Some cases only need pipeline to finish with different condition (completion, success or replication) + # Some cases only we do need pipeline to finish with expected condition (completed, succeeded or replicated) def visit_latest_pipeline(pipeline_condition: nil) Page::Project::Menu.perform(&:click_ci_cd_pipelines) Page::Project::Pipeline::Index.perform(&:"wait_for_latest_pipeline_#{pipeline_condition}") if pipeline_condition Page::Project::Pipeline::Index.perform(&:click_on_latest_pipeline) end + + def wait_for_latest_pipeline(pipeline_condition:) + Page::Project::Menu.perform(&:click_ci_cd_pipelines) + Page::Project::Pipeline::Index.perform(&:"wait_for_latest_pipeline_#{pipeline_condition}") + end end end end |