'Only one editor should be visible at a time within a single response'

@attr(shard=2)
def test_editor_visibility(self):

    self.setup_user(roles=['Moderator'])
    self.setup_view()
    page = self.create_single_thread_page('comment_edit_test_thread')
    page.visit()
    self.assertTrue(page.is_comment_editable('comment_self_author'))
    self.assertTrue(page.is_comment_editable('comment_other_author'))
    self.assertTrue(page.is_add_comment_visible('response1'))
    original_body = page.get_comment_body('comment_self_author')
    page.start_comment_edit('comment_self_author')
    self.assertFalse(page.is_add_comment_visible('response1'))
    self.assertTrue(page.is_comment_editor_visible('comment_self_author'))
    page.set_comment_editor_value('comment_self_author', 'edited    body')
    page.start_comment_edit('comment_other_author')
    self.assertFalse(page.is_comment_editor_visible('comment_self_author'))
    self.assertTrue(page.is_comment_editor_visible('comment_other_author'))
    self.assertEqual(page.get_comment_body('comment_self_author'), original_body)
    page.start_response_edit('response1')
    self.assertFalse(page.is_comment_editor_visible('comment_other_author'))
    self.assertTrue(page.is_response_editor_visible('response1'))
    original_body = page.get_comment_body('comment_self_author')
    page.start_comment_edit('comment_self_author')
    self.assertFalse(page.is_response_editor_visible('response1'))
    self.assertTrue(page.is_comment_editor_visible('comment_self_author'))
    page.cancel_comment_edit('comment_self_author', original_body)
    self.assertFalse(page.is_comment_editor_visible('comment_self_author'))
    self.assertTrue(page.is_add_comment_visible('response1'))
