Improve rerun test

for troubleshooting TNL-692
This commit is contained in:
Jesse Zoldak
2014-10-24 16:12:07 -04:00
parent 60bb6a1021
commit 74b65ddb1e
2 changed files with 12 additions and 1 deletions

View File

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

View File

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