diff --git a/common/test/acceptance/pages/studio/import_export.py b/common/test/acceptance/pages/studio/import_export.py index 15859af15e..1d8587ebf0 100644 --- a/common/test/acceptance/pages/studio/import_export.py +++ b/common/test/acceptance/pages/studio/import_export.py @@ -239,10 +239,16 @@ class ImportMixin(object): def is_timestamp_visible(self): """ - Checks if the UTC timestamp of the last successfull import is visible + Checks if the UTC timestamp of the last successful import is visible """ return self.q(css='.item-progresspoint-success-date').visible + def wait_for_timestamp_visible(self): + """ + Wait for the timestamp of the last successful import to be visible. + """ + EmptyPromise(self.is_timestamp_visible, 'Timestamp Visible', timeout=30).fulfill() + def wait_for_filename_error(self): """ Wait for the upload field to display an error. diff --git a/common/test/acceptance/tests/studio/test_import_export.py b/common/test/acceptance/tests/studio/test_import_export.py index 67af0cd00e..beadbafb68 100644 --- a/common/test/acceptance/tests/studio/test_import_export.py +++ b/common/test/acceptance/tests/studio/test_import_export.py @@ -4,7 +4,6 @@ Acceptance tests for the Import and Export pages from abc import abstractmethod from bok_choy.promise import EmptyPromise from datetime import datetime -from flaky import flaky from .base_studio_test import StudioLibraryTest, StudioCourseTest from ...fixtures.course import XBlockFixtureDesc @@ -186,7 +185,6 @@ class ImportTestMixin(object): self.import_page.upload_tarball(self.tarball_name) self.import_page.wait_for_upload() - @flaky # TODO: fix this. See TNL-2386 def test_import_timestamp(self): """ Scenario: I perform a course / library import @@ -200,13 +198,13 @@ class ImportTestMixin(object): utc_now = datetime.utcnow() import_date, import_time = self.import_page.timestamp - self.assertTrue(self.import_page.is_timestamp_visible()) + self.import_page.wait_for_timestamp_visible() self.assertEqual(utc_now.strftime('%m/%d/%Y'), import_date) self.assertEqual(utc_now.strftime('%H:%M'), import_time) self.import_page.visit() self.import_page.wait_for_tasks(completed=True) - self.assertTrue(self.import_page.is_timestamp_visible()) + self.import_page.wait_for_timestamp_visible() def test_landing_url(self): """