diff --git a/common/static/coffee/spec/discussion/view/new_post_view_spec.coffee b/common/static/coffee/spec/discussion/view/new_post_view_spec.coffee index fe98c09cd0..c7c5044b71 100644 --- a/common/static/coffee/spec/discussion/view/new_post_view_spec.coffee +++ b/common/static/coffee/spec/discussion/view/new_post_view_spec.coffee @@ -1,57 +1,7 @@ # -*- coding: utf-8 -*- describe "NewPostView", -> beforeEach -> - setFixtures( - """ -
-
-
-
-
- - - - - - - """ - ) + DiscussionSpecHelper.setUnderscoreFixtures() window.$$course_id = "edX/999/test" spyOn(DiscussionUtil, "makeWmdEditor") @discussion = new Discussion([], {pages: 1}) @@ -77,10 +27,11 @@ describe "NewPostView", -> "entries": {} }, "allow_anonymous": true, - "allow_anonymous_to_peers": true + "allow_anonymous_to_peers": true, + "is_cohorted": true }) @view = new NewPostView( - el: $(".new-post-article"), + el: $("#fixture-element"), collection: @discussion, course_settings: @course_settings, mode: "tab" @@ -144,6 +95,7 @@ describe "NewPostView", -> } } ) + DiscussionSpecHelper.makeModerator() view.render() expectCohortSelectorEnabled = (view, enabled) -> @@ -171,7 +123,7 @@ describe "NewPostView", -> {always: ->} ) view = new NewPostView( - el: $(".new-post-article"), + el: $("#fixture-element"), collection: @discussion, course_settings: new DiscussionCourseSettings({ allow_anonymous: false,