update mathjax to 2.6 (TNL-4104) and (TNL-4094)
update mathjax class names to support common html, html-css, and svg
This commit is contained in:
@@ -126,7 +126,7 @@ class DiscussionThreadPage(PageObject, DiscussionPageMixin):
|
||||
def verify_mathjax_rendered(self):
|
||||
""" Checks that MathJax css class is present """
|
||||
self.wait_for(
|
||||
lambda: self._is_element_visible(".MathJax"),
|
||||
lambda: self._is_element_visible(".MathJax_CHTML"),
|
||||
description="MathJax Preview is rendered"
|
||||
)
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class ProblemPage(PageObject):
|
||||
"""
|
||||
def mathjax_present():
|
||||
""" Returns True if MathJax css is present in the problem body """
|
||||
mathjax_container = self.q(css="div.problem p .MathJax .math")
|
||||
mathjax_container = self.q(css="div.problem p .MathJax_CHTML")
|
||||
return mathjax_container.visible and mathjax_container.present
|
||||
|
||||
self.wait_for(
|
||||
@@ -63,7 +63,7 @@ class ProblemPage(PageObject):
|
||||
"""
|
||||
def mathjax_present():
|
||||
""" Returns True if MathJax css is present in the problem body """
|
||||
mathjax_container = self.q(css="div.problem div.problem-hint .MathJax .math")
|
||||
mathjax_container = self.q(css="div.problem div.problem-hint .MathJax_CHTML")
|
||||
return mathjax_container.visible and mathjax_container.present
|
||||
|
||||
self.wait_for(
|
||||
|
||||
@@ -40,7 +40,7 @@ class TabNavPage(PageObject):
|
||||
"""
|
||||
Check that MathJax has rendered in tab content
|
||||
"""
|
||||
mathjax_container = self.q(css=".static_tab_wrapper .MathJax .math")
|
||||
mathjax_container = self.q(css=".static_tab_wrapper .MathJax_CHTML")
|
||||
EmptyPromise(
|
||||
lambda: mathjax_container.present and mathjax_container.visible,
|
||||
"MathJax is not visible"
|
||||
|
||||
Reference in New Issue
Block a user