Commit 7ca78d6e by Jesse Zoldak

Merge pull request #5724 from edx/zoldak/improve-rerun-test

Improve rerun test
parents 97d9d956 74b65ddb
......@@ -17,6 +17,14 @@ class DashboardPage(PageObject):
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
......
......@@ -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)
......
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