Commit 46c9f178 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Merge branch 'qa-speedup-new-subgroup-click' into 'master'

Speed-up the click on 'New subgroup' if the 'No results' text is shown

See merge request gitlab-org/gitlab-ce!16803
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
element :new_subgroup_button, /%input.*\.js-new-group-child/ element :new_subgroup_button, /%input.*\.js-new-group-child/
end end
view 'app/assets/javascripts/groups/constants.js' do
element :no_result_text, 'Sorry, no groups or projects matched your search'
def go_to_subgroup(name) def go_to_subgroup(name)
click_link name click_link name
end end
...@@ -24,7 +28,11 @@ ...@@ -24,7 +28,11 @@
def has_subgroup?(name) def has_subgroup?(name)
filter_by_name(name) filter_by_name(name)
page.has_link?(name) wait(reload: false) do
return false if page.has_content?('Sorry, no groups or projects matched your search')
end end
def go_to_new_subgroup def go_to_new_subgroup
Supports Markdown
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