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

project_label.rb « resource « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6b2943a801e5ca07c2474a642d9f4c39df1e6473 (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
# frozen_string_literal: true

module QA
  module Resource
    class ProjectLabel < LabelBase
      attribute :project do
        Project.fabricate! do |resource|
          resource.name = 'project-with-label'
        end
      end

      def fabricate!
        project.visit!
        Page::Project::Menu.perform(&:go_to_labels)

        super
      end

      def api_post_path
        "/projects/#{project.id}/labels"
      end

      def api_get_path
        "/projects/#{project.id}/labels/#{id}"
      end
    end
  end
end