Commit e67ddcb3 authored by Robert Speicher's avatar Robert Speicher

Clean up QA::Page::Dashboard::Groups a bit

parent 9972b0e6
...@@ -15,23 +15,23 @@ module QA ...@@ -15,23 +15,23 @@ module QA
end end
def has_test_namespace? def has_test_namespace?
filter_by_name(Runtime::Namespace.name) filter_by_name(namespace.name)
page.has_link?(Runtime::Namespace.name) page.has_link?(namespace.name)
end end
def has_sandbox? def has_sandbox?
filter_by_name(Runtime::Namespace.sandbox_name) filter_by_name(namespace.sandbox_name)
page.has_link?(Runtime::Namespace.sandbox_name) page.has_link?(namespace.sandbox_name)
end end
def go_to_test_namespace def go_to_test_namespace
click_link Runtime::Namespace.name click_link namespace.name
end end
def go_to_sandbox def go_to_sandbox
click_link Runtime::Namespace.sandbox_name click_link namespace.sandbox_name
end end
def create_group(group_name, group_description) def create_group(group_name, group_description)
...@@ -49,12 +49,17 @@ module QA ...@@ -49,12 +49,17 @@ module QA
end end
def prepare_test_namespace def prepare_test_namespace
return click_link(Runtime::Namespace.name) if has_test_namespace? if has_test_namespace?
go_to_test_namespace
else
create_group(namespace.name, "QA test run at #{namespace.time}")
end
end
private
create_group( def namespace
Runtime::Namespace.name, Runtime::Namespace
"QA test run at #{Runtime::Namespace.time}"
)
end 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