summaryrefslogtreecommitdiff
path: root/qa/qa/resource/project_imported_from_url.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/resource/project_imported_from_url.rb')
-rw-r--r--qa/qa/resource/project_imported_from_url.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/qa/qa/resource/project_imported_from_url.rb b/qa/qa/resource/project_imported_from_url.rb
new file mode 100644
index 00000000000..f159a174840
--- /dev/null
+++ b/qa/qa/resource/project_imported_from_url.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+require 'securerandom'
+
+module QA
+ module Resource
+ class ProjectImportedFromURL < Resource::Project
+ def fabricate!
+ self.import = true
+ super
+
+ group.visit!
+
+ Page::Group::Show.perform(&:go_to_new_project)
+
+ Page::Project::New.perform do |project_page|
+ project_page.click_import_project
+ project_page.click_repo_by_url_link
+ end
+
+ Page::Project::Import::RepoByURL.perform do |import_page|
+ import_page.import!(@gitlab_repository_path, @name)
+ end
+ end
+ end
+ end
+end