summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2017-05-25 10:00:15 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2017-05-25 10:00:15 +0000
commit6ece9792666d5ac8670b4c275c42c6ec8998322d (patch)
tree01c8461562898c9c033bc231aa4aeaf2e8f9c45a
parentb21673974881fa56c56a6773c3e6485dae97506b (diff)
parentd3655fe56f42e7d1821d783b274154a6f69c59c5 (diff)
downloadgitlab-ce-6ece9792666d5ac8670b4c275c42c6ec8998322d.tar.gz
Merge branch 'correct-compare_spec-transient' into 'master'
Fix transient error clicking dropdown items in compare_spec.rb See merge request !11582
-rw-r--r--spec/features/projects/compare_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/features/projects/compare_spec.rb b/spec/features/projects/compare_spec.rb
index 294a63a5c6d..4162f2579d1 100644
--- a/spec/features/projects/compare_spec.rb
+++ b/spec/features/projects/compare_spec.rb
@@ -52,8 +52,12 @@ describe "Compare", js: true do
def select_using_dropdown(dropdown_type, selection)
dropdown = find(".js-compare-#{dropdown_type}-dropdown")
dropdown.find(".compare-dropdown-toggle").click
+ # find input before using to wait for the inputs visiblity
+ dropdown.find('.dropdown-menu')
dropdown.fill_in("Filter by Git revision", with: selection)
wait_for_requests
- dropdown.find_all("a[data-ref=\"#{selection}\"]", visible: true).last.click
+ # find before all to wait for the items visiblity
+ dropdown.find("a[data-ref=\"#{selection}\"]", match: :first)
+ dropdown.all("a[data-ref=\"#{selection}\"]").last.click
end
end