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

badge_base.rb « resource « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8139cc2ec7b6bb54fbcffa743720d7b8c6be66b6 (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 Resource
    class BadgeBase < Base
      attributes :id, :name, :link_url, :image_url

      def initialize
        @name = "qa-badge-#{SecureRandom.hex(8)}"
      end

      def fabricate!
        Page::Component::Badges.perform do |badges|
          badges.show_badge_add_form
          badges.fill_name(name)
          badges.fill_link_url(link_url)
          badges.fill_image_url(image_url)
          badges.click_add_badge_button
        end
      end
    end
  end
end