summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/operations
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 00:08:11 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 00:08:11 +0000
commit93dcf45d441bc884b167f4338380c8c888e9b86f (patch)
treef55e8c1d39013380d1ff7d2a4e3cca537a35192a /qa/qa/page/project/operations
parent0e68afab211a172b862a7acc774e1eda5da8e471 (diff)
downloadgitlab-ce-93dcf45d441bc884b167f4338380c8c888e9b86f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/qa/page/project/operations')
-rw-r--r--qa/qa/page/project/operations/metrics/show.rb37
1 files changed, 37 insertions, 0 deletions
diff --git a/qa/qa/page/project/operations/metrics/show.rb b/qa/qa/page/project/operations/metrics/show.rb
index c94c1f6590f..020a3a1d5f8 100644
--- a/qa/qa/page/project/operations/metrics/show.rb
+++ b/qa/qa/page/project/operations/metrics/show.rb
@@ -11,6 +11,14 @@ module QA
view 'app/assets/javascripts/monitoring/components/dashboard.vue' do
element :prometheus_graphs
+ element :dashboards_filter_dropdown
+ element :environments_dropdown
+ element :edit_dashboard_button
+ element :show_last_dropdown
+ end
+
+ view 'app/assets/javascripts/monitoring/components/duplicate_dashboard_form.vue' do
+ element :duplicate_dashboard_filename_field
end
view 'app/assets/javascripts/monitoring/components/panel_type.vue' do
@@ -35,6 +43,35 @@ module QA
end
end
+ def has_edit_dashboard_enabled?
+ within_element :prometheus_graphs do
+ has_element? :edit_dashboard_button
+ end
+ end
+
+ def duplicate_dashboard(save_as = 'test_duplication.yml', commit_option = 'Commit to master branch')
+ click_element :dashboards_filter_dropdown
+ click_on 'Duplicate dashboard'
+ fill_element :duplicate_dashboard_filename_field, save_as
+ choose commit_option
+ within('.modal-content') { click_button(class: 'btn-success') }
+ end
+
+ def filter_environment(environment = 'production')
+ click_element :environments_dropdown
+
+ within_element :environments_dropdown do
+ click_link_with_text environment
+ end
+ end
+
+ def show_last(range = '8 hours')
+ click_element :show_last_dropdown
+ within_element :show_last_dropdown do
+ click_on range
+ end
+ end
+
private
def wait_for_data