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.
This commit is contained in:
@@ -277,6 +277,7 @@ class DiscussionThreadPage(PageObject, DiscussionPageMixin):
|
||||
def submit_comment_edit(self, comment_id, new_comment_body):
|
||||
"""Click the submit button on the comment editor"""
|
||||
self._find_within("#comment_{} .post-update".format(comment_id)).first.click()
|
||||
self.wait_for_ajax()
|
||||
EmptyPromise(
|
||||
lambda: (
|
||||
not self.is_comment_editor_visible(comment_id) and
|
||||
|
||||
@@ -547,7 +547,6 @@ class DiscussionCommentEditTest(BaseDiscussionTestCase):
|
||||
self.assertFalse(page.is_comment_editable("comment_other_author"))
|
||||
self.edit_comment(page, "comment_self_author")
|
||||
|
||||
@skip # TODO: See TNL-3943
|
||||
def test_edit_comment_as_moderator(self):
|
||||
self.setup_user(roles=["Moderator"])
|
||||
self.setup_view()
|
||||
|
||||
Reference in New Issue
Block a user