Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
d440e209
Commit
d440e209
authored
Jan 19, 2016
by
raeeschachar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed test course rerun failing on Chrome
parent
22e01a8c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
common/test/acceptance/pages/studio/course_rerun.py
+2
-0
common/test/acceptance/pages/studio/index.py
+11
-4
common/test/acceptance/tests/studio/test_studio_rerun.py
+2
-1
No files found.
common/test/acceptance/pages/studio/course_rerun.py
View file @
d440e209
...
...
@@ -39,3 +39,5 @@ class CourseRerunPage(CoursePage):
Clicks the create rerun button.
"""
self
.
q
(
css
=
'.rerun-course-save'
)[
0
]
.
click
()
# Clicking on the course will trigger an ajax event
self
.
wait_for_ajax
()
common/test/acceptance/pages/studio/index.py
View file @
d440e209
...
...
@@ -4,6 +4,7 @@ Studio Home page
from
bok_choy.page_object
import
PageObject
from
.
import
BASE_URL
from
selenium.webdriver
import
ActionChains
class
DashboardPage
(
PageObject
):
...
...
@@ -28,18 +29,24 @@ class DashboardPage(PageObject):
def
has_processing_courses
(
self
):
return
self
.
q
(
css
=
'.courses-processing'
)
.
present
def
create_rerun
(
self
,
display_name
):
def
create_rerun
(
self
,
course_key
):
"""
Clicks the create rerun link of the course specified by display_name.
Clicks the create rerun link of the course specified by course_key
'Re-run course' link doesn't show up until you mouse over that course in the course listing
"""
name
=
self
.
q
(
css
=
'.course-title'
)
.
filter
(
lambda
el
:
el
.
text
==
display_name
)[
0
]
name
.
find_elements_by_xpath
(
'../..'
)[
0
]
.
find_elements_by_class_name
(
'rerun-button'
)[
0
]
.
click
()
actions
=
ActionChains
(
self
.
browser
)
button_name
=
self
.
browser
.
find_element_by_css_selector
(
'.rerun-button[href$="'
+
course_key
+
'"]'
)
actions
.
move_to_element
(
button_name
)
actions
.
click
(
button_name
)
actions
.
perform
()
def
click_course_run
(
self
,
run
):
"""
Clicks on the course with run given by run.
"""
self
.
q
(
css
=
'.course-run .value'
)
.
filter
(
lambda
el
:
el
.
text
==
run
)[
0
]
.
click
()
# Clicking on course with run will trigger an ajax event
self
.
wait_for_ajax
()
def
has_new_library_button
(
self
):
"""
...
...
common/test/acceptance/tests/studio/test_studio_rerun.py
View file @
d440e209
...
...
@@ -67,9 +67,10 @@ class CourseRerunTest(StudioCourseTest):
Then I see one html component with the content 'Test Content'
"""
course_info
=
(
self
.
course_info
[
'org'
],
self
.
course_info
[
'number'
],
self
.
course_info
[
'run'
])
updated_course_info
=
course_info
[
0
]
+
"+"
+
course_info
[
1
]
+
"+"
+
course_info
[
2
]
self
.
dashboard_page
.
visit
()
self
.
dashboard_page
.
create_rerun
(
self
.
course_info
[
'display_name'
]
)
self
.
dashboard_page
.
create_rerun
(
updated_course_info
)
rerun_page
=
CourseRerunPage
(
self
.
browser
,
*
course_info
)
rerun_page
.
wait_for_page
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment