From da683ca7cfcb4c37eb030f3bcf8f359ad22dd9b4 Mon Sep 17 00:00:00 2001 From: Alessandro Verdura Date: Wed, 27 May 2015 17:41:46 +0200 Subject: [PATCH] Add UI acceptance test TNL-925 --- .../test/acceptance/pages/studio/import_export.py | 6 ++++++ .../acceptance/tests/studio/test_import_export.py | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/common/test/acceptance/pages/studio/import_export.py b/common/test/acceptance/pages/studio/import_export.py index 27bee884ea..ddefb484ed 100644 --- a/common/test/acceptance/pages/studio/import_export.py +++ b/common/test/acceptance/pages/studio/import_export.py @@ -226,6 +226,12 @@ class ImportMixin(object): """ return self.q(css='.wrapper-status').visible + def is_timestamp_visible(self): + """ + Checks if the UTC timestamp of the last successfull import is visible + """ + return self.q(css='.item-progresspoint-success-date').visible + 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 8e4dadf511..8e25525b62 100644 --- a/common/test/acceptance/tests/studio/test_import_export.py +++ b/common/test/acceptance/tests/studio/test_import_export.py @@ -183,6 +183,21 @@ class ImportTestMixin(object): self.import_page.upload_tarball(self.tarball_name) self.import_page.wait_for_upload() + def test_successful_import_timestamp(self): + """ + Scenario: I perform a course / library import + On import success, the page displays its UTC timestamp previously not visible + And if I refresh the page, the timestamp is still displayed + """ + self.assertFalse(self.import_page.is_timestamp_visible()) + self.import_page.upload_tarball(self.tarball_name) + self.import_page.wait_for_upload() + self.assertTrue(self.import_page.is_timestamp_visible()) + + self.import_page.visit() + self.import_page.wait_for_tasks(completed=True) + self.assertTrue(self.import_page.is_timestamp_visible()) + def test_landing_url(self): """ Scenario: When uploading a library or course, a link appears for me to view the changes.