Commit c728c9d3 by Usman Khalid

Post-rebase fixes.

parent c0fef0b0
......@@ -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",
......
......@@ -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")
......
......@@ -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},
......
......@@ -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},
......
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