summaryrefslogtreecommitdiff
path: root/spec/features/uploads
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-10-24 16:25:04 +0300
committerMike Greiling <mike@pixelcog.com>2017-10-24 16:25:04 +0300
commitf44665c893a1d54dd7f69d559e404b285e25b611 (patch)
tree89d9b3b18e1ebc4880e2cceb98e64ad447888892 /spec/features/uploads
parent9e538fd0129a08ba1b45ce3babfdf7a20198137f (diff)
downloadgitlab-ce-f44665c893a1d54dd7f69d559e404b285e25b611.tar.gz
slow down requests for dropzone uploads to avoid race conditions
Diffstat (limited to 'spec/features/uploads')
-rw-r--r--spec/features/uploads/user_uploads_file_to_note_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/features/uploads/user_uploads_file_to_note_spec.rb b/spec/features/uploads/user_uploads_file_to_note_spec.rb
index 1261ffdc2ee..47b89d262f3 100644
--- a/spec/features/uploads/user_uploads_file_to_note_spec.rb
+++ b/spec/features/uploads/user_uploads_file_to_note_spec.rb
@@ -21,6 +21,14 @@ feature 'User uploads file to note' do
end
context 'uploading is in progress' do
+ before do
+ Gitlab::Testing::RequestBlockerMiddleware.slow_requests!
+ end
+
+ after do
+ Gitlab::Testing::RequestBlockerMiddleware.allow_requests!
+ end
+
it 'shows "Cancel" button on uploading', :js do
dropzone_file([Rails.root.join('spec', 'fixtures', 'dk.png')], 0, false)