Welcome to mirror list, hosted at ThFree Co, Russian Federation.

alerts.rb « settings « project « page « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: be9b61ded805d66971cd528c65ca00920517ac5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# frozen_string_literal: true

module QA
  module Page
    module Project
      module Settings
        class Alerts < Page::Base
          view 'app/assets/javascripts/alerts_settings/components/alerts_form.vue' do
            element :create_issue_checkbox
            element :incident_templates_dropdown
            element :save_changes_button
            element :incident_templates_item
          end

          def enable_issues_for_incidents
            check_element(:create_issue_checkbox)
          end

          def select_issue_template(template)
            click_element(:incident_templates_dropdown)
            within_element :incident_templates_dropdown do
              find_element(:incident_templates_item, text: template).click
            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