summaryrefslogtreecommitdiff
path: root/qa/qa/scenario/gitlab/sandbox/prepare.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/scenario/gitlab/sandbox/prepare.rb')
-rw-r--r--qa/qa/scenario/gitlab/sandbox/prepare.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/qa/qa/scenario/gitlab/sandbox/prepare.rb b/qa/qa/scenario/gitlab/sandbox/prepare.rb
index 1875a943e4d..990de456e20 100644
--- a/qa/qa/scenario/gitlab/sandbox/prepare.rb
+++ b/qa/qa/scenario/gitlab/sandbox/prepare.rb
@@ -2,19 +2,24 @@ module QA
module Scenario
module Gitlab
module Sandbox
+ # Ensure we're in our sandbox namespace, either by navigating to it or
+ # by creating it if it doesn't yet exist
class Prepare < Scenario::Template
def perform
Page::Main::Menu.act { go_to_groups }
Page::Dashboard::Groups.perform do |page|
- if page.has_sandbox?
- page.go_to_sandbox
+ if page.has_group?(Runtime::Namespace.sandbox_name)
+ page.go_to_group(Runtime::Namespace.sandbox_name)
else
- page.create_group(Runtime::Namespace.sandbox_name, "QA sandbox")
+ page.go_to_new_group
+
+ Scenario::Gitlab::Group::Create.perform do |group|
+ group.path = Runtime::Namespace.sandbox_name
+ group.description = 'QA sandbox'
+ end
end
end
-
- Page::Group::Show.act { go_to_subgroups }
end
end
end