diff options
Diffstat (limited to 'service/test/functional/features/steps')
-rw-r--r-- | service/test/functional/features/steps/attachments.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/service/test/functional/features/steps/attachments.py b/service/test/functional/features/steps/attachments.py index 066683bf..8dc4e244 100644 --- a/service/test/functional/features/steps/attachments.py +++ b/service/test/functional/features/steps/attachments.py @@ -53,3 +53,17 @@ def load_mail_into_soledad(context, mail): def step_impl(context): attachments_list = find_elements_by_css_selector(context, '.attachmentsArea li') assert len(attachments_list) == 1 + + +@when(u'I find an attachment icon') +def find_icon(context): + assert find_element_by_css_selector(context, '#attachment-button .fa.fa-paperclip') + + +@when(u'I upload a file') +def upload_attachment(context): + base_dir = "test/functional/features/files/" + fname = "upload_test_file.txt" + fill_by_css_selector(context, '#fileupload', base_dir + fname) + attachment_list_item = wait_until_element_is_visible_by_locator(context, (By.CSS_SELECTOR, '#attachment-list-item li a')) + assert attachment_list_item.text == "%s (36.00 b)" % fname |