'Tests that mathjax is not rendered when we cancel the post
When user types the mathjax expression into discussion editor, it will appear in te preview
box, and when user cancel it and again click the "Add new post" button, mathjax will not
appear in the preview box'

def test_mathjax_not_rendered_after_post_cancel(self):

    self.page.set_new_post_editor_value('\\begin{equation}\\tau_g(\\omega)    =    -    \\frac{d}{d\\omega}\\phi(\\omega)    \\hspace{2em}    (1)    \\end{equation}')
    self.assertIsNotNone(self.page.get_new_post_preview_text())
    self.page.click_element('.cancel')
    alert = get_modal_alert(self.browser)
    alert.accept()
    self.assertIsNotNone(self.page.new_post_button)
    self.page.click_new_post_button()
    self.assertEqual(self.page.get_new_post_preview_value('.wmd-preview'), '')
