Commit 348c6105 authored by Robert Speicher's avatar Robert Speicher

Add QA::Page::Group::New to fill in the "Create group" form

parent e67ddcb3
...@@ -59,6 +59,7 @@ module QA ...@@ -59,6 +59,7 @@ module QA
end end
module Group module Group
autoload :New, 'qa/page/group/new'
autoload :Show, 'qa/page/group/show' autoload :Show, 'qa/page/group/show'
end end
......
...@@ -34,25 +34,15 @@ module QA ...@@ -34,25 +34,15 @@ module QA
click_link namespace.sandbox_name click_link namespace.sandbox_name
end end
def create_group(group_name, group_description) def create_group(group_name = nil, group_description = nil)
if page.has_content?('New Subgroup') Page::Group::New.act { create_group(group_name, group_description) }
click_on 'New Subgroup'
else
click_on 'New group'
end
fill_in 'group_path', with: group_name
fill_in 'group_description', with: group_description
choose 'Private'
click_button 'Create group'
end end
def prepare_test_namespace def prepare_test_namespace
if has_test_namespace? if has_test_namespace?
go_to_test_namespace go_to_test_namespace
else else
create_group(namespace.name, "QA test run at #{namespace.time}") create_group
end end
end end
......
module QA
module Page
module Group
class New < Page::Base
def create_group(group_name = nil, group_description = nil)
if page.has_content?('New Subgroup')
click_on 'New Subgroup'
else
click_on 'New group'
end
group_name ||= Runtime::Namespace.name
group_description ||= "QA test run at #{Runtime::Namespace.name}"
fill_in 'group_path', with: group_name
fill_in 'group_description', with: group_description
choose 'Private'
click_button 'Create group'
end
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment