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

pipeline_status_emails.rb « services « settings « project « page « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2f78577e3d5fc415229296976b0bd474ee394fc5 (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
# frozen_string_literal: true

module QA
  module Page
    module Project
      module Settings
        module Services
          class PipelineStatusEmails < QA::Page::Base
            view 'app/assets/javascripts/integrations/edit/components/integration_form.vue' do
              element :recipients_div, %q(:data-qa-selector="`${field.name}_div`") # rubocop:disable QA/ElementWithPattern
              element :notify_only_broken_pipelines_div, %q(:data-qa-selector="`${field.name}_div`") # rubocop:disable QA/ElementWithPattern
              element :save_changes_button
            end

            def set_recipients(emails)
              within_element :recipients_div do
                fill_in 'Recipients', with: emails.join(',')
              end
            end

            def toggle_notify_broken_pipelines
              within_element :notify_only_broken_pipelines_div do
                uncheck 'Notify only broken pipelines', allow_label_click: true
              end
            end

            def click_save_button
              click_element(:save_changes_button)
            end
          end
        end
      end
    end
  end
end