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.
Both of them dynamically generate specs which close over the iteration
variable of a for loop. Closures capture *references*, not values, and
so when the variable is mutated on loop iteration its new value is
used when the spec is called. This means that instead of running a
spec with n different values, we run the spec n times with the same
value. This is bad.
The JS validation utility functions from edx.utils.validate.js file
that are used on the combined login registration page include some
translatable strings that weren't getting extracted by the i18n tools
because they were defined inside underscore template strings.
This commit pulls the translatable strings out of the templates
to make sure gettext detects the strings at extraction time.
TNL-3247
Removed remaining synchronous AJAX calls from discussions
Updated the profile view tests to use an attached view for testing
Removed one-time JQuery intiialization that could fail and break multiple tests
Now using withDisabledElement to prevent multiple event handling. I've
attempted to write this as a common function in view_utils, so that this
approach can be used more generally, wherever needed. Includes a unit test.
Thanks to Christina and Andy for all their help on this one.
1. Add missing '_()' in capa_base.py & video_xfields.py
2. Fix a bug in instructor_dashboard.py that causes crash when ANALYTICS_DASHBOARD_NAME contains non-ascii characters.
3. Workaround for mis-extractions inside .underscore files when using gettext along with interpolate.
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.
Updated templates
Updating responsetype tests.
Updating other tests for PC
Putting OptionInput back the way it was.
Acceptance tests for partial credit
Testing tools
pep8
scss name fix
Missing }
icon fix
icon fix