diff options
-rw-r--r-- | service/test/functional/features/attachments.feature | 2 | ||||
-rw-r--r-- | service/test/functional/features/files/over_5mb.data | bin | 0 -> 5485760 bytes | |||
-rw-r--r-- | service/test/functional/features/steps/attachments.py | 4 | ||||
-rw-r--r-- | web-ui/app/js/mail_view/ui/attachment_list.js | 2 | ||||
-rw-r--r-- | web-ui/test/spec/mail_view/ui/attachment_list.spec.js | 8 |
5 files changed, 8 insertions, 8 deletions
diff --git a/service/test/functional/features/attachments.feature b/service/test/functional/features/attachments.feature index 7724596d..ff0b99c9 100644 --- a/service/test/functional/features/attachments.feature +++ b/service/test/functional/features/attachments.feature @@ -32,7 +32,7 @@ Feature: Attachments | Pixelated rocks! | You should definitely use it. Cheers, User. | And for the 'To' field I enter 'pixelated@friends.org' And I find an attachment icon - When I try to upload a file bigger than 1MB + When I try to upload a file bigger than 5MB Then I see an upload error message When I dismiss the error message Then It should not show the error message anymore diff --git a/service/test/functional/features/files/over_5mb.data b/service/test/functional/features/files/over_5mb.data Binary files differnew file mode 100644 index 00000000..c8908818 --- /dev/null +++ b/service/test/functional/features/files/over_5mb.data diff --git a/service/test/functional/features/steps/attachments.py b/service/test/functional/features/steps/attachments.py index c086dfcc..8b01a28a 100644 --- a/service/test/functional/features/steps/attachments.py +++ b/service/test/functional/features/steps/attachments.py @@ -60,10 +60,10 @@ def find_icon(context): assert find_element_by_css_selector(context, '#attachment-button .fa.fa-paperclip') -@when(u'I try to upload a file bigger than 1MB') +@when(u'I try to upload a file bigger than 5MB') def upload_big_file(context): base_dir = "test/functional/features/files/" - fname = "image_over_1MB.png" + fname = "over_5mb.data" context.browser.execute_script("$('#fileupload').removeAttr('hidden');") fill_by_css_selector(context, '#fileupload', base_dir + fname) wait_until_element_is_visible_by_locator(context, (By.CSS_SELECTOR, '#upload-error-message')) diff --git a/web-ui/app/js/mail_view/ui/attachment_list.js b/web-ui/app/js/mail_view/ui/attachment_list.js index fc4c0544..4ef64960 100644 --- a/web-ui/app/js/mail_view/ui/attachment_list.js +++ b/web-ui/app/js/mail_view/ui/attachment_list.js @@ -42,7 +42,7 @@ define( }); var ONE_MEGABYTE = 1024*1024; - var ATTACHMENT_SIZE_LIMIT = ONE_MEGABYTE; + var ATTACHMENT_SIZE_LIMIT = 5*ONE_MEGABYTE; this.showAttachment = function (ev, data) { this.trigger(document, events.mail.appendAttachment, data); diff --git a/web-ui/test/spec/mail_view/ui/attachment_list.spec.js b/web-ui/test/spec/mail_view/ui/attachment_list.spec.js index c0e2a5ef..2b430c28 100644 --- a/web-ui/test/spec/mail_view/ui/attachment_list.spec.js +++ b/web-ui/test/spec/mail_view/ui/attachment_list.spec.js @@ -106,15 +106,15 @@ describeMixin('mail_view/ui/attachment_list', function () { describe('File size check', function (){ var ONE_MEGABYTE = 1024*1024; - var largeAttachment = {originalFiles: [{size: ONE_MEGABYTE+1}]}; + var largeAttachment = {originalFiles: [{size: 5*ONE_MEGABYTE+1}]}; - it('should reject files larger than 1MB', function () { + it('should reject files larger than 5MB', function () { var uploadAccepted = this.component.performPreUploadCheck(null, largeAttachment); expect(uploadAccepted).toBe(false); }); - it('should accept files less or equal 1MB', function () { - var smallAttachment = {originalFiles: [{size: ONE_MEGABYTE}]}; + it('should accept files less or equal 5MB', function () { + var smallAttachment = {originalFiles: [{size: 5*ONE_MEGABYTE}]}; var uploadAccepted = this.component.performPreUploadCheck(null, smallAttachment); expect(uploadAccepted).toBe(true); |