diff options
author | Jefferson Stachelski <jeffhsta@riseup.net> | 2016-02-12 17:58:45 -0200 |
---|---|---|
committer | Jefferson Stachelski <jeffhsta@riseup.net> | 2016-02-12 17:58:45 -0200 |
commit | a9626c697992fcd596726a4c16ba8c9757f6a0dd (patch) | |
tree | 36461e71dada715b6bd1f59c311271f5a83f68b0 /service/test/functional/features/steps/attachments.py | |
parent | e889bb5c34d4fcfa0f798134771e9dcb3ab062f6 (diff) |
attachments are only un-linked from emails but not deleted in soledad
- removed backend delete of attachments
- JS unit tests
- Functional test
Issue #549
Diffstat (limited to 'service/test/functional/features/steps/attachments.py')
-rw-r--r-- | service/test/functional/features/steps/attachments.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/service/test/functional/features/steps/attachments.py b/service/test/functional/features/steps/attachments.py index b0c7c791..76e42177 100644 --- a/service/test/functional/features/steps/attachments.py +++ b/service/test/functional/features/steps/attachments.py @@ -96,3 +96,16 @@ def upload_attachment(context): 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 + + +@when(u'remove the file') +def click_remove_icon(context): + remove_icon = wait_until_element_is_visible_by_locator(context, (By.CSS_SELECTOR, '#attachment-list-item i.remove-icon')) + remove_icon.click() + + +@then(u'I should not see it attached') +def assert_attachment_removed(context): + attachments_list_ul = find_elements_by_css_selector(context, '#attachment-list-item') + attachments_list_li = context.browser.find_elements(By.CSS_SELECTOR, '#attachment-list-item li a') + assert len(attachments_list_li) == 0 |