Commit 8ca5739f by Diana Huang Committed by Brian Jacobel

Open the topic list by default.

parent a39f22d9
......@@ -266,6 +266,7 @@
}
});
this.renderThreads();
this.showBrowseMenu();
return this;
};
......
......@@ -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(false);
it('should be visible by default', function() {
expectBrowseMenuVisible(true);
});
it('should show when header button is clicked', function() {
it('should disappear when header button is clicked', function() {
$('.forum-nav-browse').click();
return expectBrowseMenuVisible(true);
return expectBrowseMenuVisible(false);
});
describe('when shown', function() {
......
......@@ -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()
......
......@@ -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)
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