Fix syntax error in selectors
.attr() now returns a string (though it can still be passed an integer)
Fixes checkbox test failures
Remove remaining references to jquery.min (in wrong folder)
$.ajax now returns 422 if type is json and body is not JSON, e.g. ''
Substitute prop for attr
Remove references to jquery.min, add jquery.migrate (again)
"Fix" jquery karma config
This wasn't suppoed to survive the merge
This throws an error when called with an 'undefined' error
Fix Karma warning about [re|un]loading the window
Fix path for jquery in cms-squire tests
Move jasmine.clock.uninstall() to afterEach so it runs even on failure
Fix test failing due to timezone issues
Do the timeout before the window scrolling (so handler will not be _.throttled)
Fix an alert() triggered by window.onBeforeUnload while testing in Chrome
isRejected is deprecated.
Actually serve the slick library in LMS jasmine tests
customwmd doesn't need to wait for DOM ready event
... In order to define a class and extend the Markdown class.
If the first date the user selects is invalid it is not set on the
model. This is because jQuery datepicker's getDate returns the
current date when an invalid value is put in the field and the
model's initial value is also the current date. So always update
the date.
TNL-4115. Previously, course updates (which are intended to be posted with
dates, for sorting in the LMS) could be authored in studio with a valid
date, nothing, or a random string as the "date" for the update. As there
is no validation for this in studio, everything succeeded with no warning.
However, the LMS has problems parsing some of these values, and barfs when
loaded by learners.
The fix does two big things:
- gracefully handles invalid dates in LMS. These updates are now treated as
having a date of today, for sorting purposes.
- turns on validation in studio. Now, it is not only impossible to enter
invalid dates in studio, but notifications will draw the course author's
eye if any invalid updates were previously saved.
Test additions for this commit:
Adds:
- unit test for LMS parsing
- Jasmine test to confirm invalid dates cannot be set by the user
-also adds event to setAndValidate instead of using a global object
- fix for lettuce test
-It is no longer valid to enter the string "January 1, 2013" as this test
had been doing. Keyed-in entries must use MM/DD/YY format.
FEDX-121
The previous approach for handling NPM assets was
to symlink them into the static directory. This appeared
to cause trouble with the asset pipeline where the files
in question were not installed and then old versions were
picked up instead.
This change instead copies NPM libraries to a new
static directory so that the pipeline can consume them
as with any other file. This new directory is added to
.gitignore so that the files don't get accidentally
checked in.
It turns out that loading JavaScript with $.getScript
causes Chrome to treat the file as an XHR request
and not JS. I've switched over to using RequireJS
to load the URL which already has the ability to
dynamically load files and have the browser
recognize them.
I've changed the logic so that AjaxHelpers keeps
track of which requests have not yet had mock
responses sent. This ensures that every response
is handled before moving on to the next one,
rather than always handling the last request.
My intention is that this won't allow bugs to creep
in where a request isn't fired and instead the test
responds to an old request. It also should ensure
that extra events aren't accidentally fired.