summaryrefslogtreecommitdiff
path: root/spec/features/dashboard/issues_spec.rb
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-10-16 12:37:52 -0500
committerEric Eastwood <contact@ericeastwood.com>2017-10-19 14:01:15 -0500
commit43377979c6cfee922702a5dc6324fded96b1f111 (patch)
tree8ac0061a979a611c9927e04815a1df5a71d2d505 /spec/features/dashboard/issues_spec.rb
parent96d8c7fff114911faa7d3e1b6322c2b9e3377e9b (diff)
downloadgitlab-ce-43377979c6cfee922702a5dc6324fded96b1f111.tar.gz
Check for element before evaluate_script
Tip from https://robots.thoughtbot.com/write-reliable-asynchronous-integration-tests-with-capybara#directly-interacting-with-javascript
Diffstat (limited to 'spec/features/dashboard/issues_spec.rb')
-rw-r--r--spec/features/dashboard/issues_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/features/dashboard/issues_spec.rb b/spec/features/dashboard/issues_spec.rb
index 5610894fd9a..a8919976c31 100644
--- a/spec/features/dashboard/issues_spec.rb
+++ b/spec/features/dashboard/issues_spec.rb
@@ -87,8 +87,10 @@ RSpec.describe 'Dashboard Issues' do
project_path = "/#{project.path_with_namespace}"
project_json = { name: project.name_with_namespace, url: project_path }.to_json
- # similate selection, and prevent overlap by dropdown menu
+ # simulate selection, and prevent overlap by dropdown menu
+ first('.project-item-select', visible: false)
execute_script("$('.project-item-select').val('#{project_json}').trigger('change');")
+ find('#select2-drop-mask', visible: false)
execute_script("$('#select2-drop-mask').remove();")
find('.new-project-item-link').trigger('click')