Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2018-05-03 20:33:40 +0300
committerMichael Kozono <mkozono@gmail.com>2018-06-08 19:05:06 +0300
commitbe806549cad030df4a081acc748bd703d140ff9d (patch)
tree68198a497c54569fb7dc48b97d569a58fb8a888e /qa
parent826d13816984cd18f579441abbda9f1a5e1d5b35 (diff)
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