summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/settings/alerts.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/project/settings/alerts.rb')
-rw-r--r--qa/qa/page/project/settings/alerts.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/qa/qa/page/project/settings/alerts.rb b/qa/qa/page/project/settings/alerts.rb
index a74a227d697..7b1d738ec3c 100644
--- a/qa/qa/page/project/settings/alerts.rb
+++ b/qa/qa/page/project/settings/alerts.rb
@@ -23,6 +23,7 @@ module QA
element :save_and_create_alert_button
element :test_payload_field
element :send_test_alert_button
+ element :prometheus_url_field
end
def enable_incident_for_alert
@@ -59,10 +60,22 @@ module QA
click_element(:integration_name_field)
end
+ def select_prometheus
+ click_element(:integration_type_dropdown)
+ find("option[value='PROMETHEUS']").click
+
+ # Click outside of the list to close it
+ click_element(:prometheus_url_field)
+ end
+
def enter_integration_name(name)
fill_element(:integration_name_field, name)
end
+ def fill_in_prometheus_url(url = Runtime::Scenario.gitlab_address)
+ fill_element(:prometheus_url_field, url)
+ end
+
def activate_integration
within_element(:active_toggle_container) do
find('.gl-toggle').click
@@ -82,6 +95,18 @@ module QA
def send_test_alert
click_element(:send_test_alert_button)
end
+
+ def go_to_view_credentials
+ click_link_with_text('View credentials')
+ end
+
+ def webhook_url
+ find('input[id="url"]').value
+ end
+
+ def authorization_key
+ find('input[id="authorization-key"]').value
+ end
end
end
end