Commit 2b2f6d18 by Eric Fischer

Wait for text to appear

Adding a wait statement to allow ajax calls to finish before making assertions
about text that has changed. Fixes TNL-3943 flaky test ticket.
parent 73f311f1
...@@ -277,6 +277,7 @@ class DiscussionThreadPage(PageObject, DiscussionPageMixin): ...@@ -277,6 +277,7 @@ class DiscussionThreadPage(PageObject, DiscussionPageMixin):
def submit_comment_edit(self, comment_id, new_comment_body): def submit_comment_edit(self, comment_id, new_comment_body):
"""Click the submit button on the comment editor""" """Click the submit button on the comment editor"""
self._find_within("#comment_{} .post-update".format(comment_id)).first.click() self._find_within("#comment_{} .post-update".format(comment_id)).first.click()
self.wait_for_ajax()
EmptyPromise( EmptyPromise(
lambda: ( lambda: (
not self.is_comment_editor_visible(comment_id) and not self.is_comment_editor_visible(comment_id) and
......
...@@ -547,7 +547,6 @@ class DiscussionCommentEditTest(BaseDiscussionTestCase): ...@@ -547,7 +547,6 @@ class DiscussionCommentEditTest(BaseDiscussionTestCase):
self.assertFalse(page.is_comment_editable("comment_other_author")) self.assertFalse(page.is_comment_editable("comment_other_author"))
self.edit_comment(page, "comment_self_author") self.edit_comment(page, "comment_self_author")
@skip # TODO: See TNL-3943
def test_edit_comment_as_moderator(self): def test_edit_comment_as_moderator(self):
self.setup_user(roles=["Moderator"]) self.setup_user(roles=["Moderator"])
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