diff options
Diffstat (limited to 'qa/qa/page/project/operations/kubernetes/show.rb')
-rw-r--r-- | qa/qa/page/project/operations/kubernetes/show.rb | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/qa/qa/page/project/operations/kubernetes/show.rb b/qa/qa/page/project/operations/kubernetes/show.rb index 46fddfa6078..e1612718883 100644 --- a/qa/qa/page/project/operations/kubernetes/show.rb +++ b/qa/qa/page/project/operations/kubernetes/show.rb @@ -29,6 +29,14 @@ module QA element :uninstall_button end + view 'app/views/clusters/clusters/_health.html.haml' do + element :cluster_health_section + end + + view 'app/views/clusters/clusters/_health_tab.html.haml' do + element :health, required: true + end + def open_details has_element?(:details, wait: 30) click_element :details @@ -71,11 +79,32 @@ module QA def save_domain click_element :save_changes_button, Page::Project::Operations::Kubernetes::Show end + + def wait_for_cluster_health + wait_until(max_duration: 120, sleep_interval: 3, reload: true) do + has_cluster_health_graphs? + end + end + + def open_health + has_element?(:health, wait: 30) + click_element :health + end + + def has_cluster_health_graphs? + within_cluster_health_section do + has_text?('CPU Usage') + end + end + + def within_cluster_health_section + within_element :cluster_health_section do + yield + end + end end end end end end end - -QA::Page::Project::Operations::Kubernetes::Show.prepend_if_ee('QA::EE::Page::Project::Operations::Kubernetes::Show') |