diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-11-01 11:58:11 -0600 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-11-01 12:29:57 -0600 |
commit | 0c49b5eb17a35a3b1929e5dc6decf9a1cc7bd910 (patch) | |
tree | 737bc824943e9ab57d08b4d0e3c751926c3b87d7 /spec/features/issues_spec.rb | |
parent | 0b8b631ad9e914918e51bdb08ad56cd85c333847 (diff) | |
download | gitlab-ce-0c49b5eb17a35a3b1929e5dc6decf9a1cc7bd910.tar.gz |
Fix cancel button not working when uploading a file on the new issue pagejivl-fix-cancel-button-file-upload-new-issue
Diffstat (limited to 'spec/features/issues_spec.rb')
-rw-r--r-- | spec/features/issues_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index d4fd3a50008..9b94452fb0d 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -583,6 +583,16 @@ describe 'Issues' do expect(page.find_field("issue_description").value).not_to match /\n\n$/ end + + it "cancels a file upload correctly" do + dropzone_file([Rails.root.join('spec', 'fixtures', 'dk.png')], 0, false) + + click_button 'Cancel' + + expect(page).to have_button('Attach a file') + expect(page).not_to have_button('Cancel') + expect(page).not_to have_selector('.uploading-progress-container', visible: true) + end end context 'form filled by URL parameters' do |