diff --git a/common/test/acceptance/pages/studio/import_export.py b/common/test/acceptance/pages/studio/import_export.py index dfebc0229b..cd544c2ba8 100644 --- a/common/test/acceptance/pages/studio/import_export.py +++ b/common/test/acceptance/pages/studio/import_export.py @@ -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) diff --git a/common/test/acceptance/tests/studio/test_import_export.py b/common/test/acceptance/tests/studio/test_import_export.py index dc0caf3d30..d23c7d9ac2 100644 --- a/common/test/acceptance/tests/studio/test_import_export.py +++ b/common/test/acceptance/tests/studio/test_import_export.py @@ -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.