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
469dac6f
Commit
469dac6f
authored
Jun 24, 2016
by
raeeschachar
Committed by
GitHub
Jun 24, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12830 from edx/raees/bokchoy-test-default-sort-preference
Fixed test default sort preference failing on chrome
parents
157c6850
c07cb190
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
common/test/acceptance/pages/lms/discussion.py
+7
-3
common/test/acceptance/tests/discussion/test_discussion.py
+0
-2
No files found.
common/test/acceptance/pages/lms/discussion.py
View file @
469dac6f
...
@@ -380,14 +380,18 @@ class DiscussionSortPreferencePage(CoursePage):
...
@@ -380,14 +380,18 @@ class DiscussionSortPreferencePage(CoursePage):
"""
"""
Return the text of option that is selected for sorting.
Return the text of option that is selected for sorting.
"""
"""
options
=
self
.
q
(
css
=
"body.discussion .forum-nav-sort-control option"
)
# Using this workaround (execute script) to make this test work with Chrome browser
return
options
.
filter
(
lambda
el
:
el
.
is_selected
())[
0
]
.
get_attribute
(
"value"
)
selected_value
=
self
.
browser
.
execute_script
(
'var selected_value = $(".forum-nav-sort-control").val(); return selected_value'
)
return
selected_value
def
change_sort_preference
(
self
,
sort_by
):
def
change_sort_preference
(
self
,
sort_by
):
"""
"""
Change the option of sorting by clicking on new option.
Change the option of sorting by clicking on new option.
"""
"""
self
.
q
(
css
=
"body.discussion .forum-nav-sort-control option[value='{0}']"
.
format
(
sort_by
))
.
click
()
self
.
q
(
css
=
".forum-nav-sort-control option[value='{0}']"
.
format
(
sort_by
))
.
click
()
# Click initiates an ajax call, waiting for it to complete
self
.
wait_for_ajax
()
def
refresh_page
(
self
):
def
refresh_page
(
self
):
"""
"""
...
...
common/test/acceptance/tests/discussion/test_discussion.py
View file @
469dac6f
...
@@ -1228,7 +1228,6 @@ class DiscussionSortPreferenceTest(UniqueCourseTest):
...
@@ -1228,7 +1228,6 @@ class DiscussionSortPreferenceTest(UniqueCourseTest):
self
.
sort_page
=
DiscussionSortPreferencePage
(
self
.
browser
,
self
.
course_id
)
self
.
sort_page
=
DiscussionSortPreferencePage
(
self
.
browser
,
self
.
course_id
)
self
.
sort_page
.
visit
()
self
.
sort_page
.
visit
()
@flaky
# TODO fix this, see TNL-4682
def
test_default_sort_preference
(
self
):
def
test_default_sort_preference
(
self
):
"""
"""
Test to check the default sorting preference of user. (Default = date )
Test to check the default sorting preference of user. (Default = date )
...
@@ -1247,7 +1246,6 @@ class DiscussionSortPreferenceTest(UniqueCourseTest):
...
@@ -1247,7 +1246,6 @@ class DiscussionSortPreferenceTest(UniqueCourseTest):
selected_sort
=
self
.
sort_page
.
get_selected_sort_preference
()
selected_sort
=
self
.
sort_page
.
get_selected_sort_preference
()
self
.
assertEqual
(
selected_sort
,
sort_type
)
self
.
assertEqual
(
selected_sort
,
sort_type
)
@flaky
# TODO fix this, see TNL-4682
def
test_last_preference_saved
(
self
):
def
test_last_preference_saved
(
self
):
"""
"""
Test that user last preference is saved.
Test that user last preference is saved.
...
...
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