Fixed JS tests

This commit is contained in:
Douglas Cerna
2017-07-06 22:38:09 -06:00
committed by Alex Dusenbery
parent 68714d9e97
commit 49a13216a4
3 changed files with 14 additions and 3 deletions

View File

@@ -73,7 +73,7 @@
course_settings: this.course_settings,
group_name: this.getGroupName()
});
this.topicView.on('thread:topic_change', this.toggleGroupDropDown);
this.topicView.on('thread:topic_change', this.toggleGroupDropdown);
if (this.course_settings.get('is_discussion_division_enabled')) {
this.topicView.on('thread:topic_change', this.updateVisibilityMessage);
}

View File

@@ -43,10 +43,21 @@
};
showDiscussion = function(test, testView) {
var courseSettings = DiscussionSpecHelper.createTestCourseSettings({
groups: [
{
id: 1,
name: 'Cohort1'
}, {
id: 2,
name: 'Cohort2'
}
]
});
setNextAjaxResult(test, {
user_info: DiscussionSpecHelper.getTestUserInfo(),
roles: DiscussionSpecHelper.getTestRoleInfo(),
course_settings: DiscussionSpecHelper.createTestCourseSettings().attributes,
course_settings: courseSettings.attributes,
discussion_data: DiscussionViewSpecHelper.makeThreadWithProps({
commentable_id: 'test-topic',
title: TEST_THREAD_TITLE

View File

@@ -95,7 +95,7 @@
'thread-response-edit', 'response-comment-show', 'response-comment-edit', 'thread-list-item',
'search-alert', 'new-post', 'thread-type', 'new-post-menu-entry', 'new-post-alert',
'new-post-menu-category', 'topic', 'post-user-display', 'inline-discussion', 'pagination',
'profile-thread', 'customwmd-prompt', 'nav-loading'
'profile-thread', 'customwmd-prompt', 'nav-loading', 'new-post-visibility'
];
templateNamesNoTrailingTemplate = [
'forum-action-endorse', 'forum-action-answer', 'forum-action-follow', 'forum-action-vote',