Commit 74b65ddb by Jesse Zoldak

Improve rerun test

for troubleshooting TNL-692
parent 60bb6a10
...@@ -17,6 +17,14 @@ class DashboardPage(PageObject): ...@@ -17,6 +17,14 @@ class DashboardPage(PageObject):
return self.q(css='body.view-dashboard').present return self.q(css='body.view-dashboard').present
@property @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): def has_processing_courses(self):
return self.q(css='.courses-processing').present return self.q(css='.courses-processing').present
......
...@@ -4,6 +4,7 @@ Acceptance tests for Studio related to course reruns. ...@@ -4,6 +4,7 @@ Acceptance tests for Studio related to course reruns.
import random import random
from bok_choy.promise import EmptyPromise from bok_choy.promise import EmptyPromise
from nose.tools import assert_in
from ...pages.studio.index import DashboardPage from ...pages.studio.index import DashboardPage
from ...pages.studio.course_rerun import CourseRerunPage from ...pages.studio.course_rerun import CourseRerunPage
...@@ -50,7 +51,7 @@ class CourseRerunTest(StudioCourseTest): ...@@ -50,7 +51,7 @@ class CourseRerunTest(StudioCourseTest):
def test_course_rerun(self): 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' Given I have a course with a section, subsesction, vertical, and html component with content 'Test Content'
When I visit the course rerun page When I visit the course rerun page
And I type 'test_rerun' in the course run field And I type 'test_rerun' in the course run field
...@@ -81,6 +82,8 @@ class CourseRerunTest(StudioCourseTest): ...@@ -81,6 +82,8 @@ class CourseRerunTest(StudioCourseTest):
return not self.dashboard_page.has_processing_courses return not self.dashboard_page.has_processing_courses
EmptyPromise(finished_processing, "Rerun finished processing", try_interval=5, timeout=60).fulfill() 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) self.dashboard_page.click_course_run(course_run)
outline_page = CourseOutlinePage(self.browser, *course_info) outline_page = CourseOutlinePage(self.browser, *course_info)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment