From 47bcedd023c71ff89385de81de89e8766e5c3ef8 Mon Sep 17 00:00:00 2001 From: Gislene Pereira Date: Wed, 27 Jan 2016 19:53:53 -0300 Subject: Revert "Issue #550 - Adding BDD tests to cover case when file is bigger than 1 MB." The 1MB file upload is timing out in snap and breaking the build. I'm reverting this commit in order to better investigate how to solve the problem. This reverts commit 31aca931fd1ec76a4ffd9099bb6b13894a9d64be. --- .../test/functional/features/attachments.feature | 8 ++---- .../functional/features/files/image_over_1MB.png | Bin 1094522 -> 0 bytes .../test/functional/features/steps/attachments.py | 31 +-------------------- 3 files changed, 3 insertions(+), 36 deletions(-) delete mode 100644 service/test/functional/features/files/image_over_1MB.png (limited to 'service/test/functional') diff --git a/service/test/functional/features/attachments.feature b/service/test/functional/features/attachments.feature index 5cdbf7be..859ee590 100644 --- a/service/test/functional/features/attachments.feature +++ b/service/test/functional/features/attachments.feature @@ -32,12 +32,8 @@ 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 - Then I see an upload error message - When I dismiss the error message - Then It should not show the error message anymore - When I upload a valid file + When I upload a file And I send it When I select the tag 'sent' And I open the first mail in the mail list - Then I see the mail has an attachment + Then I see the mail has an attachment \ No newline at end of file diff --git a/service/test/functional/features/files/image_over_1MB.png b/service/test/functional/features/files/image_over_1MB.png deleted file mode 100644 index 874eac0a..00000000 Binary files a/service/test/functional/features/files/image_over_1MB.png and /dev/null differ diff --git a/service/test/functional/features/steps/attachments.py b/service/test/functional/features/steps/attachments.py index b0c7c791..8dc4e244 100644 --- a/service/test/functional/features/steps/attachments.py +++ b/service/test/functional/features/steps/attachments.py @@ -60,36 +60,7 @@ 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') -def upload_big_file(context): - base_dir = "test/functional/features/files/" - fname = "image_over_1MB.png" - fill_by_css_selector(context, '#fileupload', base_dir + fname) - wait_until_element_is_visible_by_locator(context, (By.CSS_SELECTOR, '#upload-error-message')) - - -@then(u'I see an upload error message') -def show_upload_error_message(context): - upload_error_message = find_elements_by_css_selector(context, '#upload-error-message') - error_messages = [e.text for e in upload_error_message] - assert "Upload failed. This file exceeds the 1MB limit." in error_messages - - -@when(u'I dismiss the error message') -def dismiss_error_message(context): - dismiss_button = find_elements_by_css_selector(context, '#dismiss-button') - assert len(dismiss_button) > 0 - for button in dismiss_button: - button.click() - - -@then(u'It should not show the error message anymore') -def should_not_show_upload_error_message(context): - upload_error_message_is_present = page_has_css(context, '#upload-error-message') - assert not upload_error_message_is_present - - -@when(u'I upload a valid file') +@when(u'I upload a file') def upload_attachment(context): base_dir = "test/functional/features/files/" fname = "upload_test_file.txt" -- cgit v1.2.3