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
8ca5739f
Commit
8ca5739f
authored
Jun 03, 2016
by
Diana Huang
Committed by
Brian Jacobel
Aug 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Open the topic list by default.
parent
a39f22d9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
common/static/common/js/discussion/views/discussion_thread_list_view.js
+1
-0
common/static/common/js/spec/discussion/view/discussion_thread_list_view_spec.js
+4
-4
common/test/acceptance/pages/lms/discussion.py
+8
-0
common/test/acceptance/tests/discussion/test_discussion.py
+3
-0
No files found.
common/static/common/js/discussion/views/discussion_thread_list_view.js
View file @
8ca5739f
...
...
@@ -266,6 +266,7 @@
}
});
this
.
renderThreads
();
this
.
showBrowseMenu
();
return
this
;
};
...
...
common/static/common/js/spec/discussion/view/discussion_thread_list_view_spec.js
View file @
8ca5739f
...
...
@@ -562,13 +562,13 @@
return
expect
(
$
(
'.forum-nav-thread-list-wrapper:visible'
).
length
).
toEqual
(
isVisible
?
0
:
1
);
};
it
(
'should
not
be visible by default'
,
function
()
{
return
expectBrowseMenuVisible
(
fals
e
);
it
(
'should be visible by default'
,
function
()
{
expectBrowseMenuVisible
(
tru
e
);
});
it
(
'should
show
when header button is clicked'
,
function
()
{
it
(
'should
disappear
when header button is clicked'
,
function
()
{
$
(
'.forum-nav-browse'
).
click
();
return
expectBrowseMenuVisible
(
tru
e
);
return
expectBrowseMenuVisible
(
fals
e
);
});
describe
(
'when shown'
,
function
()
{
...
...
common/test/acceptance/pages/lms/discussion.py
View file @
8ca5739f
...
...
@@ -376,6 +376,10 @@ class DiscussionSortPreferencePage(CoursePage):
"""
return
self
.
q
(
css
=
"body.discussion .forum-nav-sort-control"
)
.
present
def
show_all_discussions
(
self
):
""" Show the list of all discussions. """
self
.
q
(
css
=
".forum-nav-browse"
)
.
click
()
def
get_selected_sort_preference
(
self
):
"""
Return the text of option that is selected for sorting.
...
...
@@ -417,6 +421,10 @@ class DiscussionTabSingleThreadPage(CoursePage):
def
__getattr__
(
self
,
name
):
return
getattr
(
self
.
thread_page
,
name
)
def
show_all_discussions
(
self
):
""" Show the list of all discussions. """
self
.
q
(
css
=
".forum-nav-browse"
)
.
click
()
def
close_open_thread
(
self
):
with
self
.
thread_page
.
secondary_action_menu_open
(
".thread-main-wrapper"
):
self
.
_find_within
(
".thread-main-wrapper .action-close"
)
.
first
.
click
()
...
...
common/test/acceptance/tests/discussion/test_discussion.py
View file @
8ca5739f
...
...
@@ -315,6 +315,7 @@ class DiscussionTabMultipleThreadTest(BaseDiscussionTestCase):
self
.
thread_ids
[
1
]
)
self
.
thread_page_1
.
visit
()
self
.
thread_page_1
.
show_all_discussions
()
def
setup_multiple_threads
(
self
,
thread_count
):
threads
=
[]
...
...
@@ -1261,6 +1262,7 @@ class DiscussionSortPreferenceTest(UniqueCourseTest):
self
.
sort_page
=
DiscussionSortPreferencePage
(
self
.
browser
,
self
.
course_id
)
self
.
sort_page
.
visit
()
self
.
sort_page
.
show_all_discussions
()
def
test_default_sort_preference
(
self
):
"""
...
...
@@ -1293,5 +1295,6 @@ class DiscussionSortPreferenceTest(UniqueCourseTest):
selected_sort
=
self
.
sort_page
.
get_selected_sort_preference
()
self
.
assertEqual
(
selected_sort
,
sort_type
)
self
.
sort_page
.
refresh_page
()
self
.
sort_page
.
show_all_discussions
()
selected_sort
=
self
.
sort_page
.
get_selected_sort_preference
()
self
.
assertEqual
(
selected_sort
,
sort_type
)
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