Commit be806549 authored by Michael Kozono's avatar Michael Kozono

Fix the “no matches” optimization

When the subgroup doesn’t exist, this will now return false as soon as the “Sorry” text appears, instead of waiting for the default Capybara wait time.
parent 826d1381
......@@ -28,11 +28,9 @@ module QA
def has_subgroup?(name)
filter_by_name(name)
wait(reload: false) do
break false if page.has_content?('Sorry, no groups or projects matched your search')
page.has_text?(/#{name}|Sorry, no groups or projects matched your search/, wait: 60)
page.has_link?(name)
end
page.has_text?(name, wait: 0)
end
def go_to_new_subgroup
......
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