Commit 83e586d1 by Eric Fischer

Merge pull request #11774 from edx/efischer/tnl-4151

Flaky Discussion Tests
parents 90c864d4 c46e5c1c
...@@ -48,6 +48,7 @@ class DiscussionThreadPage(PageObject, DiscussionPageMixin): ...@@ -48,6 +48,7 @@ class DiscussionThreadPage(PageObject, DiscussionPageMixin):
Given the selector for an ancestor of a secondary menu, return a context Given the selector for an ancestor of a secondary menu, return a context
manager that will open and close the menu manager that will open and close the menu
""" """
self.wait_for_ajax()
self._find_within(ancestor_selector + " .action-more").click() self._find_within(ancestor_selector + " .action-more").click()
EmptyPromise( EmptyPromise(
lambda: self._is_element_visible(ancestor_selector + " .actions-dropdown"), lambda: self._is_element_visible(ancestor_selector + " .actions-dropdown"),
...@@ -69,6 +70,7 @@ class DiscussionThreadPage(PageObject, DiscussionPageMixin): ...@@ -69,6 +70,7 @@ class DiscussionThreadPage(PageObject, DiscussionPageMixin):
def get_response_total_text(self): def get_response_total_text(self):
"""Returns the response count text, or None if not present""" """Returns the response count text, or None if not present"""
self.wait_for_ajax()
return self._get_element_text(".response-count") return self._get_element_text(".response-count")
def get_num_displayed_responses(self): def get_num_displayed_responses(self):
...@@ -132,6 +134,7 @@ class DiscussionThreadPage(PageObject, DiscussionPageMixin): ...@@ -132,6 +134,7 @@ class DiscussionThreadPage(PageObject, DiscussionPageMixin):
def is_response_visible(self, comment_id): def is_response_visible(self, comment_id):
"""Returns true if the response is viewable onscreen""" """Returns true if the response is viewable onscreen"""
self.wait_for_ajax()
return self._is_element_visible(".response_{} .response-body".format(comment_id)) return self._is_element_visible(".response_{} .response-body".format(comment_id))
def is_response_editable(self, response_id): def is_response_editable(self, response_id):
......
...@@ -5,7 +5,6 @@ Tests for discussion pages ...@@ -5,7 +5,6 @@ Tests for discussion pages
import datetime import datetime
from uuid import uuid4 from uuid import uuid4
from flaky import flaky
from nose.plugins.attrib import attr from nose.plugins.attrib import attr
from pytz import UTC from pytz import UTC
...@@ -401,7 +400,6 @@ class DiscussionCommentDeletionTest(BaseDiscussionTestCase): ...@@ -401,7 +400,6 @@ class DiscussionCommentDeletionTest(BaseDiscussionTestCase):
) )
view.push() view.push()
@flaky # TODO: TNL-4151
def test_comment_deletion_as_student(self): def test_comment_deletion_as_student(self):
self.setup_user() self.setup_user()
self.setup_view() self.setup_view()
......
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