summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-01-30 16:02:24 +0100
committerRémy Coutable <remy@rymai.me>2018-01-30 17:07:09 +0100
commita4fdb47f52f53293fecb434e77ce378a1cd917fc (patch)
treed4b24d4dcde6f05f6664b3fe7b886f155bd2d882
parent03f386c2b20f95272e4846f5ecab54fd8b2566e0 (diff)
downloadgitlab-ce-qa-speedup-new-subgroup-click.tar.gz
Speed-up the click on 'New subgroup' if the 'No results' text is shownqa-speedup-new-subgroup-click
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--qa/qa/page/group/show.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/qa/qa/page/group/show.rb b/qa/qa/page/group/show.rb
index f24859f2b1d..00883bbe87b 100644
--- a/qa/qa/page/group/show.rb
+++ b/qa/qa/page/group/show.rb
@@ -13,6 +13,10 @@ module QA
element :new_subgroup_button, /%input.*\.js-new-group-child/
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)
click_link name
end
@@ -24,7 +28,11 @@ module QA
def has_subgroup?(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')
+
+ page.has_link?(name)
+ end
end
def go_to_new_subgroup