summaryrefslogtreecommitdiff
path: root/qa/qa/factory/resource/project.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/factory/resource/project.rb')
-rw-r--r--qa/qa/factory/resource/project.rb29
1 files changed, 14 insertions, 15 deletions
diff --git a/qa/qa/factory/resource/project.rb b/qa/qa/factory/resource/project.rb
index 105e42b23ec..f691ae5a342 100644
--- a/qa/qa/factory/resource/project.rb
+++ b/qa/qa/factory/resource/project.rb
@@ -4,25 +4,24 @@ module QA
module Factory
module Resource
class Project < Factory::Base
- attr_accessor :description
- attr_reader :name
+ attribute :name
+ attribute :description
- dependency Factory::Resource::Group, as: :group
-
- product :group
- product :name
+ attribute :group do
+ Factory::Resource::Group.fabricate!
+ end
- product :repository_ssh_location do
- Page::Project::Show.act do
- choose_repository_clone_ssh
- repository_location
+ attribute :repository_ssh_location do
+ Page::Project::Show.perform do |page|
+ page.choose_repository_clone_ssh
+ page.repository_location
end
end
- product :repository_http_location do
- Page::Project::Show.act do
- choose_repository_clone_http
- repository_location
+ attribute :repository_http_location do
+ Page::Project::Show.perform do |page|
+ page.choose_repository_clone_http
+ page.repository_location
end
end
@@ -37,7 +36,7 @@ module QA
def fabricate!
group.visit!
- Page::Group::Show.act { go_to_new_project }
+ Page::Group::Show.perform(&:go_to_new_project)
Page::Project::New.perform do |page|
page.choose_test_namespace