diff options
Diffstat (limited to 'qa/qa/page/project/operations/metrics/show.rb')
-rw-r--r-- | qa/qa/page/project/operations/metrics/show.rb | 37 |
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 |