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
end
module Group
autoload :New, 'qa/page/group/new'
autoload :Show, 'qa/page/group/show'
end
......
......@@ -34,25 +34,15 @@ module QA
click_link namespace.sandbox_name
end
def create_group(group_name, group_description)
if page.has_content?('New Subgroup')
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'
def create_group(group_name = nil, group_description = nil)
Page::Group::New.act { create_group(group_name, group_description) }
end
def prepare_test_namespace
if has_test_namespace?
go_to_test_namespace
else
create_group(namespace.name, "QA test run at #{namespace.time}")
create_group
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