summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/infrastructure/kubernetes/index.rb
blob: 0424682179e5697575feaa59dfd503723c19168e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# frozen_string_literal: true

module QA
  module Page
    module Project
      module Infrastructure
        module Kubernetes
          class Index < Page::Base
            view 'app/assets/javascripts/clusters_list/components/clusters_view_all.vue' do
              element :connect_existing_cluster_button
            end

            def connect_existing_cluster
              click_link 'Connect existing cluster'
            end

            def has_cluster?(cluster)
              has_element?(:cluster, cluster_name: cluster.to_s)
            end

            def click_on_cluster(cluster)
              click_on cluster.cluster_name
            end
          end
        end
      end
    end
  end
end