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
cfc5857d
Commit
cfc5857d
authored
Sep 15, 2014
by
jsa
Committed by
Zia Fazal
Apr 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow TAs to select the cohort of new posts.
TNL-153
parent
e4d464fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
common/static/coffee/spec/discussion/discussion_spec_helper.coffee
+1
-0
common/static/coffee/spec/discussion/view/new_post_view_spec.coffee
+15
-8
No files found.
common/static/coffee/spec/discussion/discussion_spec_helper.coffee
View file @
cfc5857d
...
@@ -109,6 +109,7 @@ browser and pasting the output. When that file changes, this one should be rege
...
@@ -109,6 +109,7 @@ browser and pasting the output. When that file changes, this one should be rege
</div>
</div>
<input type="submit" id="edit-post-submit" class="post-update" value="Update post">
<input type="submit" id="edit-post-submit" class="post-update" value="Update post">
<a href="#" class="post-cancel">Cancel</a>
<a href="#" class="post-cancel">Cancel</a>
</div>
</script>
</script>
<script aria-hidden="true" type="text/template" id="thread-response-template">
<script aria-hidden="true" type="text/template" id="thread-response-template">
...
...
common/static/coffee/spec/discussion/view/new_post_view_spec.coffee
View file @
cfc5857d
...
@@ -226,19 +226,26 @@ describe "NewPostView", ->
...
@@ -226,19 +226,26 @@ describe "NewPostView", ->
mode
:
"tab"
mode
:
"tab"
)
)
expectCohortSelectorVisible
=
(
view
,
visible
)
->
checkVisibility
=
(
view
,
expectedVisible
)
=>
expect
(
view
.
$
(
".js-group-select"
).
is
(
":visible"
)).
toEqual
(
visible
)
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"
,
->
it
"is not visible to students"
,
->
@
view
.
render
()
checkVisibility
(
@
view
,
false
)
expectCohortSelectorVisible
(
@
view
,
false
)
it
"allows TAs to see the cohort selector"
,
->
DiscussionSpecHelper
.
makeTA
()
checkVisibility
(
@
view
,
true
)
it
"allows moderators to se
lect visibility
"
,
->
it
"allows moderators to se
e the cohort selector
"
,
->
DiscussionSpecHelper
.
makeModerator
()
DiscussionSpecHelper
.
makeModerator
()
@
view
.
render
()
checkVisibility
(
@
view
,
true
)
expectCohortSelectorVisible
(
@
view
,
true
)
expect
(
@
view
.
$
(
".js-group-select"
).
prop
(
"disabled"
)).
toEqual
(
false
)
it
"allows the user to make a cohort selection"
,
->
DiscussionSpecHelper
.
makeModerator
()
@
view
.
render
()
expectedGroupId
=
null
expectedGroupId
=
null
DiscussionSpecHelper
.
makeAjaxSpy
(
DiscussionSpecHelper
.
makeAjaxSpy
(
(
params
)
->
expect
(
params
.
data
.
group_id
).
toEqual
(
expectedGroupId
)
(
params
)
->
expect
(
params
.
data
.
group_id
).
toEqual
(
expectedGroupId
)
...
...
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