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
c728c9d3
Commit
c728c9d3
authored
Apr 20, 2016
by
Usman Khalid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-rebase fixes.
parent
c0fef0b0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
13 deletions
+24
-13
cms/static/coffee/spec/main_squire.coffee
+2
-2
cms/static/coffee/spec/views/course_info_spec.coffee
+14
-8
cms/static/karma_cms.conf.js
+7
-2
cms/static/karma_cms_squire.conf.js
+1
-1
No files found.
cms/static/coffee/spec/main_squire.coffee
View file @
c728c9d3
...
...
@@ -24,8 +24,8 @@ requirejs.config({
"datepair"
:
"xmodule_js/common_static/js/vendor/timepicker/datepair"
,
"date"
:
"xmodule_js/common_static/js/vendor/date"
,
"text"
:
"xmodule_js/common_static/js/vendor/requirejs/text"
,
"underscore"
:
"
xmodule_js/common_static/
common/js/vendor/underscore"
,
"underscore.string"
:
"
xmodule_js/common_static/
common/js/vendor/underscore.string"
,
"underscore"
:
"common/js/vendor/underscore"
,
"underscore.string"
:
"common/js/vendor/underscore.string"
,
"backbone"
:
"xmodule_js/common_static/js/vendor/backbone-min"
,
"backbone.associations"
:
"xmodule_js/common_static/js/vendor/backbone-associations-min"
,
"backbone.paginator"
:
"xmodule_js/common_static/js/vendor/backbone.paginator.min"
,
...
...
cms/static/coffee/spec/views/course_info_spec.coffee
View file @
c728c9d3
...
...
@@ -94,6 +94,20 @@ define ["js/views/course_info_handout", "js/views/course_info_update", "js/model
previewContents
=
@
courseInfoEdit
.
$el
.
find
(
'.update-contents'
).
html
()
expect
(
previewContents
).
toEqual
(
'existing update'
)
@
testInvalidDateValue
=
(
value
)
->
@
courseInfoEdit
.
onNew
(
@
event
)
expect
(
@
courseInfoEdit
.
$el
.
find
(
'.save-button'
).
hasClass
(
"is-disabled"
)).
toEqual
(
false
)
@
courseInfoEdit
.
$el
.
find
(
'input.date'
).
val
(
value
).
trigger
(
"change"
)
courseInfoEdit
=
@
courseInfoEdit
jasmine
.
waitUntil
(
->
courseInfoEdit
.
$el
.
find
(
'.save-button'
).
hasClass
(
'is-disabled'
)
==
true
).
then
->
courseInfoEdit
.
$el
.
find
(
'input.date'
).
val
(
'01/01/16'
).
trigger
'change'
jasmine
.
waitUntil
(
->
courseInfoEdit
.
$el
.
find
(
'.save-button'
).
hasClass
(
'is-disabled'
)
==
false
).
always
done
return
cancelEditingUpdate
=
(
update
,
modalCover
,
useCancelButton
)
->
if
useCancelButton
update
.
$el
.
find
(
'.cancel-button'
).
click
()
...
...
@@ -153,14 +167,6 @@ define ["js/views/course_info_handout", "js/views/course_info_update", "js/model
it
"does not remove existing course info on click outside modal"
,
->
@
cancelExistingCourseInfo
(
false
)
@
testInvalidDateValue
:
(
value
)
->
@
courseInfoEdit
.
onNew
(
@
event
)
expect
(
@
courseInfoEdit
.
$el
.
find
(
'.save-button'
).
hasClass
(
"is-disabled"
)).
toEqual
(
false
)
@
courseInfoEdit
.
$el
.
find
(
'input.date'
).
val
(
value
).
trigger
(
"change"
)
expect
(
@
courseInfoEdit
.
$el
.
find
(
'.save-button'
).
hasClass
(
"is-disabled"
)).
toEqual
(
true
)
@
courseInfoEdit
.
$el
.
find
(
'input.date'
).
val
(
"01/01/16"
).
trigger
(
"change"
)
expect
(
@
courseInfoEdit
.
$el
.
find
(
'.save-button'
).
hasClass
(
"is-disabled"
)).
toEqual
(
false
)
it
"does not allow updates to be saved with an invalid date"
,
->
@
testInvalidDateValue
(
"Marchtober 40, 2048"
)
...
...
cms/static/karma_cms.conf.js
View file @
c728c9d3
...
...
@@ -34,7 +34,7 @@ var files = [
{
pattern
:
'xmodule_js/common_static/js/vendor/jquery.cookie.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/jquery.simulate.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/
js/vendor/underscore.string.min
.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/
common/js/vendor/underscore.string
.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone-associations-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone.paginator.min.js'
,
included
:
false
},
...
...
@@ -53,7 +53,7 @@ var files = [
{
pattern
:
'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/**/*.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/src/xmodule.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/test/i18n.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/draggabilly.
pkgd.
js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/draggabilly.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/date.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/domReady.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/URI.min.js'
,
included
:
false
},
...
...
@@ -77,6 +77,11 @@ var files = [
{
pattern
:
'xmodule_js/common_static/js/vendor/mock-ajax.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/requirejs/text.js'
,
included
:
false
},
{
pattern
:
'edx-ui-toolkit/js/utils/global-loader.js'
,
included
:
false
},
{
pattern
:
'edx-pattern-library/js/modernizr-custom.js'
,
included
:
false
},
{
pattern
:
'edx-pattern-library/js/afontgarde.js'
,
included
:
false
},
{
pattern
:
'edx-pattern-library/js/edx-icons.js'
,
included
:
false
},
// Paths to source JavaScript files
{
pattern
:
'xmodule_js/common_static/js/libs/jasmine-extensions.js'
,
included
:
true
,
nocache
:
true
},
{
pattern
:
'coffee/src/**/*.js'
,
included
:
false
,
nocache
:
true
},
...
...
cms/static/karma_cms_squire.conf.js
View file @
c728c9d3
...
...
@@ -34,7 +34,7 @@ var files = [
{
pattern
:
'xmodule_js/common_static/js/vendor/jquery-ui.min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/jquery.cookie.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/
js/vendor/underscore.string.min
.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/
common/js/vendor/underscore.string
.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone-associations-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone.paginator.min.js'
,
included
:
false
},
...
...
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