summaryrefslogtreecommitdiff
path: root/qa/qa/flow/pipeline.rb
blob: ff23907c081d7addfed6a00d8c448557e6166246 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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