summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-02 18:07:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-02 18:07:42 +0000
commit7b52c7cb634ef7047d30b0337fe477bcdcedf41d (patch)
tree374ca9e908204488422046f10e340d1500780362 /qa
parentb375c6c05fbd03aea33a9ee9f82e678bdaa8c3cc (diff)
downloadgitlab-ce-7b52c7cb634ef7047d30b0337fe477bcdcedf41d.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa.rb4
-rw-r--r--qa/qa/fixtures/monitored_auto_devops/.gitlab-ci.yml2
-rw-r--r--qa/qa/page/project/operations/metrics.rb46
-rw-r--r--qa/qa/page/project/operations/metrics/show.rb50
4 files changed, 54 insertions, 48 deletions
diff --git a/qa/qa.rb b/qa/qa.rb
index fb0c06e33aa..ac5569bfad8 100644
--- a/qa/qa.rb
+++ b/qa/qa.rb
@@ -296,7 +296,9 @@ module QA
autoload :Show, 'qa/page/project/operations/kubernetes/show'
end
- autoload :Metrics, 'qa/page/project/operations/metrics'
+ module Metrics
+ autoload :Show, 'qa/page/project/operations/metrics/show'
+ end
end
module Wiki
diff --git a/qa/qa/fixtures/monitored_auto_devops/.gitlab-ci.yml b/qa/qa/fixtures/monitored_auto_devops/.gitlab-ci.yml
index a65ae5aa1d9..d8ca7b591ed 100644
--- a/qa/qa/fixtures/monitored_auto_devops/.gitlab-ci.yml
+++ b/qa/qa/fixtures/monitored_auto_devops/.gitlab-ci.yml
@@ -7,7 +7,7 @@ image: alpine:latest
variables:
# AUTO_DEVOPS_DOMAIN is the application deployment domain and should be set as a variable at the group or project level.
- AUTO_DEVOPS_DOMAIN: my-fake-domain.com
+ AUTO_DEVOPS_DOMAIN: $AUTO_DEVOPS_DOMAIN
POSTGRES_USER: user
POSTGRES_PASSWORD: testing-password
diff --git a/qa/qa/page/project/operations/metrics.rb b/qa/qa/page/project/operations/metrics.rb
deleted file mode 100644
index 710cb68ed41..00000000000
--- a/qa/qa/page/project/operations/metrics.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# frozen_string_literal: true
-
-module QA
- module Page
- module Project
- module Operations
- class Metrics < Page::Base
- EXPECTED_TITLE = 'Memory Usage (Total)'
- LOADING_MESSAGE = 'Waiting for performance data'
-
- view 'app/assets/javascripts/monitoring/components/dashboard.vue' do
- element :prometheus_graphs
- end
-
- view 'app/assets/javascripts/monitoring/components/panel_type.vue' do
- element :prometheus_graph_widgets
- element :prometheus_widgets_dropdown
- element :alert_widget_menu_item
- end
-
- def wait_for_metrics
- wait_for_data
- return if has_metrics?
-
- wait_until(max_duration: 180) do
- wait_for_data
- has_metrics?
- end
- end
-
- def wait_for_data
- wait_until(reload: false) { !has_text?(LOADING_MESSAGE) } if has_text?(LOADING_MESSAGE)
- end
-
- def has_metrics?
- within_element :prometheus_graphs do
- has_text?(EXPECTED_TITLE)
- end
- end
- end
- end
- end
- end
-end
-
-QA::Page::Project::Operations::Metrics.prepend_if_ee('QA::EE::Page::Project::Operations::Metrics')
diff --git a/qa/qa/page/project/operations/metrics/show.rb b/qa/qa/page/project/operations/metrics/show.rb
new file mode 100644
index 00000000000..c94c1f6590f
--- /dev/null
+++ b/qa/qa/page/project/operations/metrics/show.rb
@@ -0,0 +1,50 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Project
+ module Operations
+ module Metrics
+ class Show < Page::Base
+ EXPECTED_TITLE = 'Memory Usage (Total)'
+ LOADING_MESSAGE = 'Waiting for performance data'
+
+ view 'app/assets/javascripts/monitoring/components/dashboard.vue' do
+ element :prometheus_graphs
+ end
+
+ view 'app/assets/javascripts/monitoring/components/panel_type.vue' do
+ element :prometheus_graph_widgets
+ element :prometheus_widgets_dropdown
+ element :alert_widget_menu_item
+ end
+
+ def wait_for_metrics
+ wait_for_data
+ return if has_metrics?
+
+ wait_until(max_duration: 180) do
+ wait_for_data
+ has_metrics?
+ end
+ end
+
+ def has_metrics?
+ within_element :prometheus_graphs do
+ has_text?(EXPECTED_TITLE)
+ end
+ end
+
+ private
+
+ def wait_for_data
+ wait_until(reload: false) { !has_text?(LOADING_MESSAGE) } if has_text?(LOADING_MESSAGE)
+ end
+ end
+ end
+ end
+ end
+ end
+end
+
+QA::Page::Project::Operations::Metrics::Show.prepend_if_ee('QA::EE::Page::Project::Operations::Metrics::Show')