def test_mathjax_in_hint(self): """ Test that MathJax have successfully rendered in problem hint """ self.courseware_page.visit() problem_page = ProblemPage(self.browser) self.assertEqual(problem_page.problem_name, "MATHJAX TEST PROBLEM") problem_page.verify_mathjax_rendered_in_problem() # The hint button rotates through multiple hints problem_page.click_hint(hint_index=0) self.assertEqual( ["<strong>Hint (1 of 2): </strong>mathjax should work1"], problem_page.extract_hint_text_from_html) problem_page.verify_mathjax_rendered_in_hint() # Rotate the hint and check the problem hint problem_page.click_hint(hint_index=1) self.assertEqual([ "<strong>Hint (1 of 2): </strong>mathjax should work1", "<strong>Hint (2 of 2): </strong>mathjax should work2" ], problem_page.extract_hint_text_from_html) problem_page.verify_mathjax_rendered_in_hint()
def test_mathjax_in_hint(self): """ Test that MathJax have successfully rendered in problem hint """ self.courseware_page.visit() problem_page = ProblemPage(self.browser) self.assertEqual(problem_page.problem_name, "MATHJAX TEST PROBLEM") problem_page.verify_mathjax_rendered_in_problem() # The hint button rotates through multiple hints problem_page.click_hint(hint_index=0) self.assertEqual( ["<strong>Hint (1 of 2): </strong>mathjax should work1"], problem_page.extract_hint_text_from_html ) problem_page.verify_mathjax_rendered_in_hint() # Rotate the hint and check the problem hint problem_page.click_hint(hint_index=1) self.assertEqual( [ "<strong>Hint (1 of 2): </strong>mathjax should work1", "<strong>Hint (2 of 2): </strong>mathjax should work2" ], problem_page.extract_hint_text_from_html ) problem_page.verify_mathjax_rendered_in_hint()