diff --git a/common/test/acceptance/pages/studio/index.py b/common/test/acceptance/pages/studio/index.py index 491850a977..af163eca68 100644 --- a/common/test/acceptance/pages/studio/index.py +++ b/common/test/acceptance/pages/studio/index.py @@ -16,6 +16,14 @@ class DashboardPage(PageObject): def is_browser_on_page(self): return self.q(css='body.view-dashboard').present + @property + def course_runs(self): + """ + The list of course run metadata for all displayed courses + Returns an empty string if there are none + """ + return self.q(css='.course-run>.value').text + @property def has_processing_courses(self): return self.q(css='.courses-processing').present diff --git a/common/test/acceptance/tests/studio/test_studio_rerun.py b/common/test/acceptance/tests/studio/test_studio_rerun.py index 4862ba4d7e..a193fd46fc 100644 --- a/common/test/acceptance/tests/studio/test_studio_rerun.py +++ b/common/test/acceptance/tests/studio/test_studio_rerun.py @@ -4,6 +4,7 @@ Acceptance tests for Studio related to course reruns. import random from bok_choy.promise import EmptyPromise +from nose.tools import assert_in from ...pages.studio.index import DashboardPage from ...pages.studio.course_rerun import CourseRerunPage @@ -50,7 +51,7 @@ class CourseRerunTest(StudioCourseTest): def test_course_rerun(self): """ - Scenario: Courses can be rurun + Scenario: Courses can be rerun Given I have a course with a section, subsesction, vertical, and html component with content 'Test Content' When I visit the course rerun page And I type 'test_rerun' in the course run field @@ -81,6 +82,8 @@ class CourseRerunTest(StudioCourseTest): return not self.dashboard_page.has_processing_courses EmptyPromise(finished_processing, "Rerun finished processing", try_interval=5, timeout=60).fulfill() + + assert_in(course_run, self.dashboard_page.course_runs) self.dashboard_page.click_course_run(course_run) outline_page = CourseOutlinePage(self.browser, *course_info)