summaryrefslogtreecommitdiff
path: root/qa/qa/page/clusters/shared/show.rb
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-11-22 22:40:05 +1300
committerThong Kuah <tkuah@gitlab.com>2018-11-22 23:29:40 +1300
commit1b95882c39ada0eb78b810f500c8cf1f2083d4bd (patch)
treef6d764ae1d97c202b7d1cc02a6bee119e0842baa /qa/qa/page/clusters/shared/show.rb
parent6a31259ccef5106126421ab5a93fd303a9326e4a (diff)
downloadgitlab-ce-1b95882c39ada0eb78b810f500c8cf1f2083d4bd.tar.gz
Group cluster QA specgroup-cluster-qa-spec
Diffstat (limited to 'qa/qa/page/clusters/shared/show.rb')
-rw-r--r--qa/qa/page/clusters/shared/show.rb40
1 files changed, 40 insertions, 0 deletions
diff --git a/qa/qa/page/clusters/shared/show.rb b/qa/qa/page/clusters/shared/show.rb
new file mode 100644
index 00000000000..d516d1e36ba
--- /dev/null
+++ b/qa/qa/page/clusters/shared/show.rb
@@ -0,0 +1,40 @@
+module QA
+ module Page
+ module Clusters
+ module Shared
+ module Show
+ def self.included(base)
+ base.view 'app/assets/javascripts/clusters/components/application_row.vue' do
+ element :application_row, 'js-cluster-application-row-${this.id}' # rubocop:disable QA/ElementWithPattern
+ element :install_button, "s__('ClusterIntegration|Install')" # rubocop:disable QA/ElementWithPattern
+ element :installed_button, "s__('ClusterIntegration|Installed')" # rubocop:disable QA/ElementWithPattern
+ end
+
+ base.view 'app/assets/javascripts/clusters/components/applications.vue' do
+ element :ingress_ip_address, 'id="ingress-ip-address"' # rubocop:disable QA/ElementWithPattern
+ end
+ end
+
+ def install!(application_name)
+ within(".js-cluster-application-row-#{application_name}") do
+ page.has_button?('Install', wait: 30)
+ click_on 'Install'
+ end
+ end
+
+ def await_installed(application_name)
+ within(".js-cluster-application-row-#{application_name}") do
+ page.has_text?('Installed', wait: 300)
+ end
+ end
+
+ def ingress_ip
+ # We need to wait longer since it can take some time before the
+ # ip address is assigned for the ingress controller
+ page.find('#ingress-ip-address', wait: 500).value
+ end
+ end
+ end
+ end
+ end
+end