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
ee0cd9e8
Commit
ee0cd9e8
authored
Oct 07, 2015
by
raeeschachar
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10011 from edx/raees-chrome-bok-choy-test-undo-changes
Fixed 2 bok choy tests failing on chrome
parents
ee203ed9
cb02b62b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
common/test/acceptance/pages/studio/settings_advanced.py
+17
-0
common/test/acceptance/tests/studio/test_studio_settings.py
+1
-3
No files found.
common/test/acceptance/pages/studio/settings_advanced.py
View file @
ee0cd9e8
...
...
@@ -48,11 +48,26 @@ class AdvancedSettingsPage(CoursePage):
self
.
browser
.
refresh
()
self
.
wait_for_page
()
def
coordinates_for_scrolling
(
self
,
coordinates_for
):
"""
Get the x and y coordinates of elements
"""
cordinates_dict
=
self
.
browser
.
find_element_by_css_selector
(
coordinates_for
)
location
=
cordinates_dict
.
location
for
key
,
val
in
location
.
iteritems
():
if
key
==
'x'
:
x_axis
=
val
elif
key
==
'y'
:
y_axis
=
val
return
x_axis
,
y_axis
def
undo_changes_via_modal
(
self
):
"""
Trigger clicking event of the undo changes button in the modal.
Wait for the undoing process to load via ajax call.
Before that Scroll so the button is clickable on all browsers
"""
self
.
browser
.
execute_script
(
"window.scrollTo"
+
str
(
self
.
coordinates_for_scrolling
(
UNDO_BUTTON_SELECTOR
)))
self
.
q
(
css
=
UNDO_BUTTON_SELECTOR
)
.
click
()
self
.
wait_for_ajax
()
...
...
@@ -60,7 +75,9 @@ class AdvancedSettingsPage(CoursePage):
"""
Trigger click event of the manual changes button in the modal.
No need to wait for any ajax.
Before that Scroll so the button is clickable on all browsers
"""
self
.
browser
.
execute_script
(
"window.scrollTo"
+
str
(
self
.
coordinates_for_scrolling
(
MANUAL_BUTTON_SELECTOR
)))
self
.
q
(
css
=
MANUAL_BUTTON_SELECTOR
)
.
click
()
def
is_validation_modal_present
(
self
):
...
...
common/test/acceptance/tests/studio/test_studio_settings.py
View file @
ee0cd9e8
...
...
@@ -304,7 +304,7 @@ class AdvancedSettingsValidationTest(StudioCourseTest):
# Let modal popup
self
.
advanced_settings
.
wait_for_modal_load
()
#
Press
Undo Changes button
#
Click
Undo Changes button
self
.
advanced_settings
.
undo_changes_via_modal
()
# Check that changes are undone
...
...
@@ -335,8 +335,6 @@ class AdvancedSettingsValidationTest(StudioCourseTest):
# Iterate through the wrong values and make sure they're still displayed
for
key
,
val
in
inputs
.
iteritems
():
print
self
.
advanced_settings
.
get
(
key
)
print
val
self
.
assertEquals
(
str
(
self
.
advanced_settings
.
get
(
key
)),
str
(
val
),
...
...
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