Commit fbaa4e5e by cahrens

Wait for MathJax to render.

parent 5a043e5a
......@@ -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):
......
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