diff options
Diffstat (limited to 'service/test/functional/features/steps/attachments.py')
-rw-r--r-- | service/test/functional/features/steps/attachments.py | 31 |
1 files changed, 1 insertions, 30 deletions
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" |