Commit 0cce36a8 by jsa Committed by Jonathan Piacenti

Copied test specs

parent 382c2edf
......@@ -328,7 +328,7 @@ browser and pasting the output. When that file changes, this one should be rege
<% }); %>
</select>
</label><div class="field-help">
Discussion admins, moderators, and TAs can make their posts visible to all students or specify a single cohort.
Discussion admins, moderators, and TAs can make their posts visible to all students or specify a single cohort group.
</div>
</div>
<% } %>
......
......@@ -74,6 +74,23 @@ describe "NewPostView", ->
# It should be visible and enabled once more.
checkVisibility(@view, true, false, false)
checkVisibility = (view, expectedVisible) =>
view.render()
expect(view.$(".js-group-select").is(":visible")).toEqual(expectedVisible)
if expectedVisible
expect(view.$(".js-group-select").prop("disabled")).toEqual(false)
it "is not visible to students", ->
checkVisibility(@view, false)
it "allows TAs to see the cohort selector", ->
DiscussionSpecHelper.makeTA()
checkVisibility(@view, true)
it "allows moderators to see the cohort selector", ->
DiscussionSpecHelper.makeModerator()
checkVisibility(@view, true)
it "allows the user to make a cohort selection", ->
DiscussionSpecHelper.makeModerator()
@view.render()
......
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