Commit ae34c3fe by Calen Pennington

Mark xblock initialization status using css class (in part to make testing easier)

parent 35fbc15e
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
$element.trigger("xblock-initialized") $element.trigger("xblock-initialized")
$element.data("initialized", true) $element.data("initialized", true)
$element.addClass("xblock-initialized")
block block
initializeBlocks: (element) -> initializeBlocks: (element) ->
......
...@@ -25,10 +25,7 @@ class AcidView(PageObject): ...@@ -25,10 +25,7 @@ class AcidView(PageObject):
self.context_selector = context_selector self.context_selector = context_selector
def is_browser_on_page(self): def is_browser_on_page(self):
return ( return self.is_css_present('{}.xblock-initialized .acid-block'.format(self.context_selector))
self.is_css_present('{} .acid-block'.format(self.context_selector)) and
self.browser.evaluate_script("$({!r}).data('initialized')".format(self.context_selector))
)
def test_passed(self, test_selector): def test_passed(self, test_selector):
""" """
......
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