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
f929b493
Commit
f929b493
authored
Aug 09, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add in jasmine test for rubric, fix combinedopenended jasmine failures
parent
adbfdcce
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
common/lib/xmodule/xmodule/js/fixtures/rubric.html
+0
-0
common/lib/xmodule/xmodule/js/spec/combinedopenended/display_spec.coffee
+31
-2
No files found.
common/lib/xmodule/xmodule/js/fixtures/rubric.html
0 → 100644
View file @
f929b493
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/js/spec/combinedopenended/display_spec.coffee
View file @
f929b493
describe
'Rubric'
,
->
beforeEach
->
spyOn
Logger
,
'log'
# load up some fixtures
loadFixtures
'rubric.html'
jasmine
.
Clock
.
useMock
()
@
element
=
$
(
'.combined-open-ended'
)
@
location
=
@
element
.
data
(
'location'
)
describe
'constructor'
,
->
beforeEach
->
@
rub
=
new
Rubric
@
element
it
'rubric should properly grab the element'
,
->
expect
(
@
rub
.
el
).
toEqual
@
element
describe
'initialize'
,
->
beforeEach
->
@
rub
=
new
Rubric
@
element
@
rub
.
initialize
@
location
it
'rubric correctly sets location'
,
->
expect
(
$
(
@
rub
.
rubric_sel
).
data
(
'location'
)).
toEqual
@
location
it
'rubric correctly read'
,
->
expect
(
@
rub
.
categories
.
length
).
toEqual
5
describe
'CombinedOpenEnded'
,
->
describe
'CombinedOpenEnded'
,
->
beforeEach
->
beforeEach
->
spyOn
Logger
,
'log'
spyOn
Logger
,
'log'
...
@@ -13,7 +40,7 @@ describe 'CombinedOpenEnded', ->
...
@@ -13,7 +40,7 @@ describe 'CombinedOpenEnded', ->
@
combined
=
new
CombinedOpenEnded
@
element
@
combined
=
new
CombinedOpenEnded
@
element
it
'set the element'
,
->
it
'set the element'
,
->
expect
(
@
combined
.
el
ement
).
toEqual
@
element
expect
(
@
combined
.
el
).
toEqual
@
element
it
'get the correct values from data fields'
,
->
it
'get the correct values from data fields'
,
->
expect
(
@
combined
.
ajax_url
).
toEqual
'/courses/MITx/6.002x/2012_Fall/modx/i4x://MITx/6.002x/combinedopenended/CombinedOE'
expect
(
@
combined
.
ajax_url
).
toEqual
'/courses/MITx/6.002x/2012_Fall/modx/i4x://MITx/6.002x/combinedopenended/CombinedOE'
...
@@ -77,7 +104,7 @@ describe 'CombinedOpenEnded', ->
...
@@ -77,7 +104,7 @@ describe 'CombinedOpenEnded', ->
@
combined
.
child_state
=
'done'
@
combined
.
child_state
=
'done'
@
combined
.
rebind
()
@
combined
.
rebind
()
expect
(
@
combined
.
answer_area
.
attr
(
"disabled"
)).
toBe
(
"disabled"
)
expect
(
@
combined
.
answer_area
.
attr
(
"disabled"
)).
toBe
(
"disabled"
)
expect
(
@
combined
.
next_problem
).
toHaveBeenCalled
(
)
expect
(
@
combined
.
next_problem
_button
).
toBe
(
":visible"
)
describe
'next_problem'
,
->
describe
'next_problem'
,
->
beforeEach
->
beforeEach
->
...
@@ -109,3 +136,5 @@ describe 'CombinedOpenEnded', ->
...
@@ -109,3 +136,5 @@ describe 'CombinedOpenEnded', ->
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