Fix flaky test_import_timestamp test.

TNL-2386
This commit is contained in:
cahrens
2015-06-22 13:02:44 -04:00
committed by Andy Armstrong
parent aa76d9482a
commit 923edee15f
2 changed files with 9 additions and 5 deletions

View File

@@ -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.

View File

@@ -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):
"""