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:
Eric Fischer
2016-01-19 15:23:48 -05:00
parent 73f311f1f6
commit 2b2f6d18d6
2 changed files with 1 additions and 1 deletions

View File

@@ -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

View File

@@ -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()