Commit 125930cf by Christina Roberts

Merge pull request #10223 from edx/christina/upgrade-mathjax

Upgrade to MathJax 2.5.
parents a0c25f88 fbaa4e5e
...@@ -70,7 +70,7 @@ require.config({ ...@@ -70,7 +70,7 @@ require.config({
// end of Annotation tool files // end of Annotation tool files
// externally hosted files // externally hosted files
"mathjax": "//cdn.mathjax.org/mathjax/2.4-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured", "mathjax": "//cdn.mathjax.org/mathjax/2.5-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured",
"youtube": [ "youtube": [
// youtube URL does not end in ".js". We add "?noext" to the path so // youtube URL does not end in ".js". We add "?noext" to the path so
// that require.js adds the ".js" to the query component of the URL, // that require.js adds the ".js" to the query component of the URL,
......
...@@ -51,7 +51,7 @@ requirejs.config({ ...@@ -51,7 +51,7 @@ requirejs.config({
"URI": "xmodule_js/common_static/js/vendor/URI.min", "URI": "xmodule_js/common_static/js/vendor/URI.min",
"mock-ajax": "xmodule_js/common_static/js/vendor/mock-ajax", "mock-ajax": "xmodule_js/common_static/js/vendor/mock-ajax",
"mathjax": "//cdn.mathjax.org/mathjax/2.4-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured", "mathjax": "//cdn.mathjax.org/mathjax/2.5-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured",
"youtube": "//www.youtube.com/player_api?noext", "youtube": "//www.youtube.com/player_api?noext",
"coffee/src/ajax_prefix": "xmodule_js/common_static/coffee/src/ajax_prefix", "coffee/src/ajax_prefix": "xmodule_js/common_static/coffee/src/ajax_prefix",
......
...@@ -42,7 +42,7 @@ requirejs.config({ ...@@ -42,7 +42,7 @@ requirejs.config({
"domReady": "xmodule_js/common_static/js/vendor/domReady", "domReady": "xmodule_js/common_static/js/vendor/domReady",
"URI": "xmodule_js/common_static/js/vendor/URI.min", "URI": "xmodule_js/common_static/js/vendor/URI.min",
"mathjax": "//cdn.mathjax.org/mathjax/2.4-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured", "mathjax": "//cdn.mathjax.org/mathjax/2.5-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured",
"youtube": "//www.youtube.com/player_api?noext", "youtube": "//www.youtube.com/player_api?noext",
"coffee/src/ajax_prefix": "xmodule_js/common_static/coffee/src/ajax_prefix" "coffee/src/ajax_prefix": "xmodule_js/common_static/coffee/src/ajax_prefix"
......
...@@ -50,4 +50,4 @@ ...@@ -50,4 +50,4 @@
<!-- This must appear after all mathjax-config blocks, so it is after the imports from the other templates. <!-- This must appear after all mathjax-config blocks, so it is after the imports from the other templates.
It can't be run through static.url because MathJax uses crazy url introspection to do lazy loading of It can't be run through static.url because MathJax uses crazy url introspection to do lazy loading of
MathJax extension libraries --> MathJax extension libraries -->
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/2.4-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"></script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/2.5-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"></script>
...@@ -275,19 +275,28 @@ class ProblemWithMathjax(ProblemsTest): ...@@ -275,19 +275,28 @@ class ProblemWithMathjax(ProblemsTest):
problem_page = ProblemPage(self.browser) problem_page = ProblemPage(self.browser)
self.assertEqual(problem_page.problem_name, "MATHJAX TEST PROBLEM") self.assertEqual(problem_page.problem_name, "MATHJAX TEST PROBLEM")
# Verify Mathjax have been rendered # Verify MathJax has been rendered
self.assertTrue(problem_page.mathjax_rendered_in_problem, "MathJax did not rendered in body") problem_page.wait_for(
lambda: problem_page.mathjax_rendered_in_problem,
description="MathJax rendered in body"
)
# The hint button rotates through multiple hints # The hint button rotates through multiple hints
problem_page.click_hint() problem_page.click_hint()
self.assertIn("Hint (1 of 2): mathjax should work1", problem_page.hint_text) self.assertIn("Hint (1 of 2): mathjax should work1", problem_page.hint_text)
self.assertTrue(problem_page.mathjax_rendered_in_hint, "MathJax did not rendered in problem hint") problem_page.wait_for(
lambda: problem_page.mathjax_rendered_in_hint,
description="MathJax rendered in hint"
)
# Rotate the hint and check the problem hint # Rotate the hint and check the problem hint
problem_page.click_hint() problem_page.click_hint()
self.assertIn("Hint (2 of 2): mathjax should work2", problem_page.hint_text) self.assertIn("Hint (2 of 2): mathjax should work2", problem_page.hint_text)
self.assertTrue(problem_page.mathjax_rendered_in_hint, "MathJax did not rendered in problem hint") problem_page.wait_for(
lambda: problem_page.mathjax_rendered_in_hint,
description="MathJax rendered in hint"
)
class ProblemPartialCredit(ProblemsTest): class ProblemPartialCredit(ProblemsTest):
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
'jasmine.async': 'xmodule_js/common_static/js/vendor/jasmine.async', 'jasmine.async': 'xmodule_js/common_static/js/vendor/jasmine.async',
'draggabilly': 'xmodule_js/common_static/js/vendor/draggabilly.pkgd', 'draggabilly': 'xmodule_js/common_static/js/vendor/draggabilly.pkgd',
'domReady': 'xmodule_js/common_static/js/vendor/domReady', 'domReady': 'xmodule_js/common_static/js/vendor/domReady',
'mathjax': '//cdn.mathjax.org/mathjax/2.4-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured', 'mathjax': '//cdn.mathjax.org/mathjax/2.5-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured', // jshint ignore:line
'youtube': '//www.youtube.com/player_api?noext', 'youtube': '//www.youtube.com/player_api?noext',
'coffee/src/ajax_prefix': 'xmodule_js/common_static/coffee/src/ajax_prefix', 'coffee/src/ajax_prefix': 'xmodule_js/common_static/coffee/src/ajax_prefix',
'coffee/src/instructor_dashboard/student_admin': 'coffee/src/instructor_dashboard/student_admin', 'coffee/src/instructor_dashboard/student_admin': 'coffee/src/instructor_dashboard/student_admin',
......
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