summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/settings/incidents.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/project/settings/incidents.rb')
-rw-r--r--qa/qa/page/project/settings/incidents.rb37
1 files changed, 37 insertions, 0 deletions
diff --git a/qa/qa/page/project/settings/incidents.rb b/qa/qa/page/project/settings/incidents.rb
new file mode 100644
index 00000000000..94d5fc369ad
--- /dev/null
+++ b/qa/qa/page/project/settings/incidents.rb
@@ -0,0 +1,37 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Project
+ module Settings
+ class Incidents < Page::Base
+ view 'app/views/projects/settings/operations/_incidents.html.haml' do
+ element :create_issue_checkbox
+ element :incident_templates_dropdown
+ element :save_changes_button
+ end
+
+ def enable_issues_for_incidents
+ check_element :create_issue_checkbox
+ end
+
+ def select_issue_template(template)
+ within_element :incident_templates_dropdown do
+ find(:option, template).select_option
+ end
+ end
+
+ def save_incident_settings
+ click_element :save_changes_button
+ end
+
+ def has_template?(template)
+ within_element :incident_templates_dropdown do
+ has_text?(template)
+ end
+ end
+ end
+ end
+ end
+ end
+end