diff options
author | Anike Arni <anikarni@gmail.com> | 2017-03-13 18:41:59 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-13 18:41:59 -0300 |
commit | 99a6a41ffea6de9e4b3df43265282d76c3391fd1 (patch) | |
tree | 2b4d7b3c5ebd267ad252ab05c440a90033e4f962 /service/test/functional/features/steps/attachments.py | |
parent | 8595d3d4f31b761574c08d6f9cdf5bfc00f53a99 (diff) | |
parent | 412d95d64b5d26d4f5e00a85b7b62da23e9bb168 (diff) |
Merge branch 'master' into makefile-tests
Diffstat (limited to 'service/test/functional/features/steps/attachments.py')
-rw-r--r-- | service/test/functional/features/steps/attachments.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/service/test/functional/features/steps/attachments.py b/service/test/functional/features/steps/attachments.py index 8852b787..37fabb6a 100644 --- a/service/test/functional/features/steps/attachments.py +++ b/service/test/functional/features/steps/attachments.py @@ -13,6 +13,8 @@ # # You should have received a copy of the GNU Affero General Public License # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. +import os + from email.MIMEMultipart import MIMEMultipart from email.mime.application import MIMEApplication from email.mime.text import MIMEText @@ -67,8 +69,10 @@ def find_icon(context): def upload_big_file(context): base_dir = "test/functional/features/files/" fname = "over_5mb.data" + path = os.path.abspath(os.path.join(base_dir, fname)) + context.browser.execute_script("$('#fileupload').removeAttr('hidden');") - fill_by_css_selector(context, '#fileupload', base_dir + fname) + fill_by_css_selector(context, '#fileupload', path) find_element_by_css_selector(context, '#upload-error-message') @@ -97,7 +101,9 @@ def should_not_show_upload_error_message(context): def upload_attachment(context): base_dir = "test/functional/features/files/" fname = "5mb.data" - fill_by_css_selector(context, '#fileupload', base_dir + fname) + path = os.path.abspath(os.path.join(base_dir, fname)) + + fill_by_css_selector(context, '#fileupload', path) attachment_list_item = find_element_by_css_selector(context, '#attachment-list-item li a') assert attachment_list_item.text == "%s (5.00 Mb)" % fname |