diff --git a/cms/static/cms/js/require-config.js b/cms/static/cms/js/require-config.js index 4e5be98dfc..6bcdbb88ac 100644 --- a/cms/static/cms/js/require-config.js +++ b/cms/static/cms/js/require-config.js @@ -70,7 +70,7 @@ require.config({ // end of Annotation tool 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 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, diff --git a/cms/static/coffee/spec/main.coffee b/cms/static/coffee/spec/main.coffee index 14315b5236..a2a5cb3083 100644 --- a/cms/static/coffee/spec/main.coffee +++ b/cms/static/coffee/spec/main.coffee @@ -51,7 +51,7 @@ requirejs.config({ "URI": "xmodule_js/common_static/js/vendor/URI.min", "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", "coffee/src/ajax_prefix": "xmodule_js/common_static/coffee/src/ajax_prefix", diff --git a/cms/static/coffee/spec/main_squire.coffee b/cms/static/coffee/spec/main_squire.coffee index f9053e5e3b..20cb7bc7a0 100644 --- a/cms/static/coffee/spec/main_squire.coffee +++ b/cms/static/coffee/spec/main_squire.coffee @@ -42,7 +42,7 @@ requirejs.config({ "domReady": "xmodule_js/common_static/js/vendor/domReady", "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", "coffee/src/ajax_prefix": "xmodule_js/common_static/coffee/src/ajax_prefix" diff --git a/common/templates/mathjax_include.html b/common/templates/mathjax_include.html index f15fc0fc67..4b20473367 100644 --- a/common/templates/mathjax_include.html +++ b/common/templates/mathjax_include.html @@ -50,4 +50,4 @@ - + diff --git a/common/test/acceptance/tests/lms/test_lms_problems.py b/common/test/acceptance/tests/lms/test_lms_problems.py index f3a13a28e0..d97ad1d906 100644 --- a/common/test/acceptance/tests/lms/test_lms_problems.py +++ b/common/test/acceptance/tests/lms/test_lms_problems.py @@ -275,19 +275,28 @@ class ProblemWithMathjax(ProblemsTest): problem_page = ProblemPage(self.browser) self.assertEqual(problem_page.problem_name, "MATHJAX TEST PROBLEM") - # Verify Mathjax have been rendered - self.assertTrue(problem_page.mathjax_rendered_in_problem, "MathJax did not rendered in body") + # Verify MathJax has been rendered + problem_page.wait_for( + lambda: problem_page.mathjax_rendered_in_problem, + description="MathJax rendered in body" + ) # The hint button rotates through multiple hints problem_page.click_hint() 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 problem_page.click_hint() 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): diff --git a/lms/static/js/spec/main.js b/lms/static/js/spec/main.js index ae2cdb7e02..01bbb5c0c5 100644 --- a/lms/static/js/spec/main.js +++ b/lms/static/js/spec/main.js @@ -49,7 +49,7 @@ 'jasmine.async': 'xmodule_js/common_static/js/vendor/jasmine.async', 'draggabilly': 'xmodule_js/common_static/js/vendor/draggabilly.pkgd', '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', 'coffee/src/ajax_prefix': 'xmodule_js/common_static/coffee/src/ajax_prefix', 'coffee/src/instructor_dashboard/student_admin': 'coffee/src/instructor_dashboard/student_admin',