summaryrefslogtreecommitdiff
path: root/qa/qa/resource/project_label.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/resource/project_label.rb')
-rw-r--r--qa/qa/resource/project_label.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/qa/qa/resource/project_label.rb b/qa/qa/resource/project_label.rb
new file mode 100644
index 00000000000..6b2943a801e
--- /dev/null
+++ b/qa/qa/resource/project_label.rb
@@ -0,0 +1,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