diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2018-03-18 15:28:04 +0000 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-03-19 12:38:54 -0500 |
commit | db6948aa8daf99576b545e1cbfdebe023630ea14 (patch) | |
tree | cf615018388a5eb2c18c540e5fcb823fede26bf1 /spec | |
parent | ae3553dbf4afd981ef6682d7deb104c7038a5a60 (diff) | |
download | gitlab-ce-db6948aa8daf99576b545e1cbfdebe023630ea14.tar.gz |
Merge branch 'fix-dropzone-project-show' into 'master'
Fix dropzone project show
Closes #44137
See merge request gitlab-org/gitlab-ce!17784
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/projects/show_project_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/projects/show_project_spec.rb b/spec/features/projects/show_project_spec.rb index 0a014e9f080..e4f13e6cab7 100644 --- a/spec/features/projects/show_project_spec.rb +++ b/spec/features/projects/show_project_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' describe 'Project show page', :feature do + include DropzoneHelper + context 'when project pending delete' do let(:project) { create(:project, :empty_repo, pending_delete: true) } @@ -334,4 +336,24 @@ describe 'Project show page', :feature do end end end + + describe 'dropzone', :js do + let(:project) { create(:project, :repository) } + let(:user) { create(:user) } + + before do + project.add_master(user) + sign_in(user) + + visit project_path(project) + end + + it 'can upload files' do + find('.add-to-tree').click + click_link 'Upload file' + drop_in_dropzone(File.join(Rails.root, 'spec', 'fixtures', 'doc_sample.txt')) + + expect(find('.dz-filename')).to have_content('doc_sample.txt') + end + end end |