From 9308560b5114f2c349558f8e984b105c225aefa7 Mon Sep 17 00:00:00 2001 From: Christoph Kluenter Date: Tue, 23 Aug 2016 17:15:02 +0200 Subject: accept uploads to up to 5MB --- service/test/functional/features/attachments.feature | 2 +- service/test/functional/features/files/5mb.daata | Bin 0 -> 5485760 bytes service/test/functional/features/steps/attachments.py | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 service/test/functional/features/files/5mb.daata (limited to 'service') 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/5mb.daata b/service/test/functional/features/files/5mb.daata new file mode 100644 index 00000000..c8908818 Binary files /dev/null and b/service/test/functional/features/files/5mb.daata differ diff --git a/service/test/functional/features/steps/attachments.py b/service/test/functional/features/steps/attachments.py index c086dfcc..1805e094 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 = "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')) -- cgit v1.2.3