diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-10-16 12:37:52 -0500 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-10-19 14:01:15 -0500 |
commit | 43377979c6cfee922702a5dc6324fded96b1f111 (patch) | |
tree | 8ac0061a979a611c9927e04815a1df5a71d2d505 /spec/features/dashboard | |
parent | 96d8c7fff114911faa7d3e1b6322c2b9e3377e9b (diff) | |
download | gitlab-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')
-rw-r--r-- | spec/features/dashboard/issues_spec.rb | 4 |
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') |