Commit a4fdb47f authored by Rémy Coutable's avatar Rémy Coutable

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

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 03f386c2
...@@ -13,6 +13,10 @@ module QA ...@@ -13,6 +13,10 @@ module QA
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'
end
def go_to_subgroup(name) def go_to_subgroup(name)
click_link name click_link name
end end
...@@ -24,8 +28,12 @@ module QA ...@@ -24,8 +28,12 @@ module QA
def has_subgroup?(name) def has_subgroup?(name)
filter_by_name(name) filter_by_name(name)
wait(reload: false) do
return false if page.has_content?('Sorry, no groups or projects matched your search')
page.has_link?(name) page.has_link?(name)
end end
end
def go_to_new_subgroup def go_to_new_subgroup
within '.new-project-subgroup' do within '.new-project-subgroup' do
......
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