Commit a38f71cd by JonahStanley

Fixed the upload test

parent 5919456f
...@@ -24,13 +24,10 @@ def go_to_uploads(_step): ...@@ -24,13 +24,10 @@ def go_to_uploads(_step):
def upload_file(_step, file_name): def upload_file(_step, file_name):
upload_css = 'a.upload-button' upload_css = 'a.upload-button'
world.css_click(upload_css) world.css_click(upload_css)
file_css = 'input.file-input'
upload = world.css_find(file_css)
#uploading the file itself #uploading the file itself
path = os.path.join(TEST_ROOT, 'uploads/', file_name) path = os.path.join(TEST_ROOT, 'uploads/', file_name)
upload._element.send_keys(os.path.abspath(path)) world.browser.execute_script("$('input.file-input').css('display', 'block')")
world.browser.attach_file('file', os.path.abspath(path))
close_css = 'a.close-button' close_css = 'a.close-button'
world.css_click(close_css) world.css_click(close_css)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment