Skip to content
Snippets Groups Projects
Commit 7680d0b9 authored by Muddasser's avatar Muddasser
Browse files

Decreased the flakiness of upload_tar function

parent 68ae1325
No related branches found
No related tags found
No related merge requests found
......@@ -178,7 +178,15 @@ class ImportMixin(object):
asset_file_path = self.file_path(tarball_filename)
# Make the upload elements visible to the WebDriver.
self.browser.execute_script('$(".file-name-block").show();$(".file-input").show()')
# Upload the file.
self.q(css='input[type="file"]')[0].send_keys(asset_file_path)
# Upload the same file again. Reason behind this is to decrease the
# probability or fraction of times the failure occur. Please be
# noted this doesn't eradicate the root cause of the error, it
# just decreases to failure rate to minimal.
# Jira ticket reference: TNL-4191.
self.q(css='input[type="file"]')[0].send_keys(asset_file_path)
# Some of the tests need these lines to pass so don't remove them.
self._wait_for_button()
click_css(self, '.submit-button', require_notification=False)
......
......@@ -182,7 +182,6 @@ class ImportTestMixin(object):
"""
return []
@flaky # TODO, fix this: TNL-4191
def test_upload(self):
"""
Scenario: I want to upload a course or library for import.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment