diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-12 12:09:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-12 12:09:55 +0300 |
commit | 18f7828977b74bf6e5153594a098ef90e773b3b7 (patch) | |
tree | 49cb1e16d5341d773807ee583357ae6eb167d61f /spec/javascripts | |
parent | 8191b1571c017378eac33b3ed296ad5216d0a410 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/blob/blob_file_dropzone_spec.js | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/spec/javascripts/blob/blob_file_dropzone_spec.js b/spec/javascripts/blob/blob_file_dropzone_spec.js deleted file mode 100644 index fe03775ec4d..00000000000 --- a/spec/javascripts/blob/blob_file_dropzone_spec.js +++ /dev/null @@ -1,39 +0,0 @@ -import $ from 'jquery'; -import BlobFileDropzone from '~/blob/blob_file_dropzone'; - -describe('BlobFileDropzone', function() { - preloadFixtures('blob/show.html'); - - beforeEach(() => { - loadFixtures('blob/show.html'); - const form = $('.js-upload-blob-form'); - this.blobFileDropzone = new BlobFileDropzone(form, 'POST'); - this.dropzone = $('.js-upload-blob-form .dropzone').get(0).dropzone; - this.replaceFileButton = $('#submit-all'); - }); - - describe('submit button', () => { - it('requires file', () => { - spyOn(window, 'alert'); - - this.replaceFileButton.click(); - - expect(window.alert).toHaveBeenCalled(); - }); - - it('is disabled while uploading', () => { - spyOn(window, 'alert'); - - const file = new File([], 'some-file.jpg'); - const fakeEvent = $.Event('drop', { - dataTransfer: { files: [file] }, - }); - - this.dropzone.listeners[0].events.drop(fakeEvent); - this.replaceFileButton.click(); - - expect(window.alert).not.toHaveBeenCalled(); - expect(this.replaceFileButton.is(':disabled')).toEqual(true); - }); - }); -}); |