summaryrefslogtreecommitdiff
path: root/qa/qa/flow/pipeline.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/flow/pipeline.rb')
-rw-r--r--qa/qa/flow/pipeline.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/qa/qa/flow/pipeline.rb b/qa/qa/flow/pipeline.rb
new file mode 100644
index 00000000000..ff23907c081
--- /dev/null
+++ b/qa/qa/flow/pipeline.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+module QA
+ module Flow
+ module Pipeline
+ 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)
+ 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
+ end
+ end
+end