diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-10-06 13:04:06 +0200 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-10-06 13:04:06 +0200 |
commit | e67ddcb302520b25fc6f313b6e1253a80201c6b3 (patch) | |
tree | 28c17e0876fd242533475aacf7bbc10eb4fbe3e7 /qa | |
parent | 9972b0e6a041354b9fd83945c75b2f099280e772 (diff) | |
download | gitlab-ce-e67ddcb302520b25fc6f313b6e1253a80201c6b3.tar.gz |
Clean up QA::Page::Dashboard::Groups a bit
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/dashboard/groups.rb | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/qa/qa/page/dashboard/groups.rb b/qa/qa/page/dashboard/groups.rb index e81b751082b..f3338dcbc9a 100644 --- a/qa/qa/page/dashboard/groups.rb +++ b/qa/qa/page/dashboard/groups.rb @@ -15,23 +15,23 @@ module QA end 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 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 def go_to_test_namespace - click_link Runtime::Namespace.name + click_link namespace.name end def go_to_sandbox - click_link Runtime::Namespace.sandbox_name + click_link namespace.sandbox_name end def create_group(group_name, group_description) @@ -49,12 +49,17 @@ module QA end 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( - Runtime::Namespace.name, - "QA test run at #{Runtime::Namespace.time}" - ) + def namespace + Runtime::Namespace end end end |