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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/resource/fork.rb')
-rw-r--r--qa/qa/resource/fork.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/qa/qa/resource/fork.rb b/qa/qa/resource/fork.rb
index d0aaaae6a11..106d1d5548a 100644
--- a/qa/qa/resource/fork.rb
+++ b/qa/qa/resource/fork.rb
@@ -3,6 +3,8 @@
module QA
module Resource
class Fork < Base
+ attr_accessor :namespace_path
+
attribute :name do
upstream.name
end
@@ -31,6 +33,8 @@ module QA
def fabricate!
populate(:upstream, :user)
+ namespace_path ||= user.name
+
# Sign out as admin and sign is as the fork user
Page::Main::Menu.perform(&:sign_out)
Runtime::Browser.visit(:gitlab, Page::Main::Login)
@@ -43,11 +47,11 @@ module QA
Page::Project::Show.perform(&:fork_project)
Page::Project::Fork::New.perform do |fork_new|
- fork_new.choose_namespace(user.name)
+ fork_new.fork_project(namespace_path)
end
- Page::Layout::Banner.perform do |banner|
- banner.has_notice?('The project was successfully forked.')
+ Page::Project::Show.perform do |project_page|
+ raise ResourceFabricationFailedError, "Forking failed!" unless project_page.forked_from?(upstream.name)
end
populate(:project)