summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2018-05-03 10:33:40 -0700
committerMichael Kozono <mkozono@gmail.com>2018-06-08 09:05:06 -0700
commitbe806549cad030df4a081acc748bd703d140ff9d (patch)
tree68198a497c54569fb7dc48b97d569a58fb8a888e /qa
parent826d13816984cd18f579441abbda9f1a5e1d5b35 (diff)
downloadgitlab-ce-be806549cad030df4a081acc748bd703d140ff9d.tar.gz
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.
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/group/show.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/qa/qa/page/group/show.rb b/qa/qa/page/group/show.rb
index 89125bd2e59..3e0eaa392f5 100644
--- a/qa/qa/page/group/show.rb
+++ b/qa/qa/page/group/show.rb
@@ -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