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

visibility_setting.rb « component « page « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4370cfb4564a1519eec178b5b5303775694634a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

module QA
  module Page
    module Component
      module VisibilitySetting
        extend QA::Page::PageConcern

        def self.included(base)
          super

          base.view 'app/views/shared/_visibility_radios.html.haml' do
            element :visibility_radio, 'qa_selector: "#{visibility_level_label(level).downcase}_radio"' # rubocop:disable QA/ElementWithPattern, Lint/InterpolationCheck
          end
        end

        def set_visibility(visibility)
          choose_element("#{visibility.downcase}_radio", false, true)
        end
      end
    end
  end
end