summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-01-29 14:08:33 +0000
committerRémy Coutable <remy@rymai.me>2018-01-29 14:08:33 +0000
commit51897df564db16726b452bdacf9eabe85b7c06f1 (patch)
tree85ef64ec7749782657757a85a6d10c73839f0ba0 /qa
parentfca48225c3e7725431838a9d334c078e38e590dd (diff)
parenta1a458279489e6b95209a55f1878642d53218684 (diff)
downloadgitlab-ce-51897df564db16726b452bdacf9eabe85b7c06f1.tar.gz
Merge branch 'qa/mk-fix-unable-to-click-new-project-in-dropdown' into 'master'
[CE backport] Fix intermittently failed click in dropdown in QA See merge request gitlab-org/gitlab-ce!16738
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/group/show.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/qa/qa/page/group/show.rb b/qa/qa/page/group/show.rb
index 37ed3b35bce..f23294145dd 100644
--- a/qa/qa/page/group/show.rb
+++ b/qa/qa/page/group/show.rb
@@ -25,7 +25,12 @@ module QA
def go_to_new_subgroup
within '.new-project-subgroup' do
- find('.dropdown-toggle').click
+ # May need to click again because it is possible to click the button quicker than the JS is bound
+ wait(reload: false) do
+ find('.dropdown-toggle').click
+
+ page.has_css?("li[data-value='new-subgroup']")
+ end
find("li[data-value='new-subgroup']").click
end
@@ -34,7 +39,12 @@ module QA
def go_to_new_project
within '.new-project-subgroup' do
- find('.dropdown-toggle').click
+ # May need to click again because it is possible to click the button quicker than the JS is bound
+ wait(reload: false) do
+ find('.dropdown-toggle').click
+
+ page.has_css?("li[data-value='new-project']")
+ end
find("li[data-value='new-project']").click
end