summaryrefslogtreecommitdiff
path: root/qa/qa/page/component/import/gitlab.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/component/import/gitlab.rb')
-rw-r--r--qa/qa/page/component/import/gitlab.rb40
1 files changed, 40 insertions, 0 deletions
diff --git a/qa/qa/page/component/import/gitlab.rb b/qa/qa/page/component/import/gitlab.rb
new file mode 100644
index 00000000000..2fd2a45b399
--- /dev/null
+++ b/qa/qa/page/component/import/gitlab.rb
@@ -0,0 +1,40 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Component
+ module Import
+ module Gitlab
+ def self.included(base)
+ super
+
+ base.view 'app/views/import/gitlab_projects/new.html.haml' do
+ element :import_project_button
+ end
+
+ base.view 'app/views/import/shared/_new_project_form.html.haml' do
+ element :project_name_field
+ element :project_slug_field
+ end
+ end
+
+ def set_imported_project_name(name)
+ fill_element(:project_name_field, name)
+ end
+
+ def attach_exported_file(path)
+ page.attach_file("file", path, make_visible: { display: 'block' })
+ end
+
+ def click_import_gitlab_project
+ click_element(:import_project_button)
+
+ wait_until(reload: false) do
+ has_notice?("The project was successfully imported.")
+ end
+ end
+ end
+ end
+ end
+ end
+end