Remove flaky tests.
This commit is contained in:
@@ -1016,7 +1016,7 @@ class DiscussionEditorPreviewTest(UniqueCourseTest):
|
||||
|
||||
|
||||
@attr(shard=2)
|
||||
class InlineDiscussionTest(UniqueCourseTest, DiscussionResponsePaginationTestMixin):
|
||||
class InlineDiscussionTest(UniqueCourseTest):
|
||||
"""
|
||||
Tests for inline discussions
|
||||
"""
|
||||
@@ -1052,13 +1052,6 @@ class InlineDiscussionTest(UniqueCourseTest, DiscussionResponsePaginationTestMix
|
||||
self.discussion_page = InlineDiscussionPage(self.browser, self.discussion_id)
|
||||
self.additional_discussion_page = InlineDiscussionPage(self.browser, self.additional_discussion_id)
|
||||
|
||||
def setup_thread_page(self, thread_id):
|
||||
self.browser.refresh()
|
||||
if not self.discussion_page.is_discussion_expanded():
|
||||
self.discussion_page.expand_discussion()
|
||||
self.discussion_page.show_thread(thread_id)
|
||||
self.thread_page = self.discussion_page.thread_page # pylint: disable=attribute-defined-outside-init
|
||||
|
||||
# This test is too flaky to run at all. TNL-6215
|
||||
@attr('a11y')
|
||||
@nottest
|
||||
@@ -1105,34 +1098,6 @@ class InlineDiscussionTest(UniqueCourseTest, DiscussionResponsePaginationTestMix
|
||||
def test_discussion_empty(self):
|
||||
self.assertEqual(self.discussion_page.get_num_displayed_threads(), 0)
|
||||
|
||||
def check_anonymous_to_peers(self, is_staff):
|
||||
thread = Thread(id=uuid4().hex, anonymous_to_peers=True, commentable_id=self.discussion_id)
|
||||
thread_fixture = SingleThreadViewFixture(thread)
|
||||
thread_fixture.push()
|
||||
self.setup_thread_page(thread.get("id")) # pylint: disable=no-member
|
||||
self.assertEqual(self.thread_page.is_thread_anonymous(), not is_staff)
|
||||
|
||||
def test_anonymous_to_peers_threads_as_staff(self):
|
||||
AutoAuthPage(self.browser, course_id=self.course_id, roles="Administrator").visit()
|
||||
self.courseware_page.visit()
|
||||
self.check_anonymous_to_peers(True)
|
||||
|
||||
def test_anonymous_to_peers_threads_as_peer(self):
|
||||
self.check_anonymous_to_peers(False)
|
||||
|
||||
def test_discussion_blackout_period(self):
|
||||
self.start_discussion_blackout_period()
|
||||
self.browser.refresh()
|
||||
thread = Thread(id=uuid4().hex, commentable_id=self.discussion_id)
|
||||
thread_fixture = SingleThreadViewFixture(thread)
|
||||
thread_fixture.addResponse(
|
||||
Response(id="response1"),
|
||||
[Comment(id="comment1", user_id="other"), Comment(id="comment2", user_id=self.user_id)])
|
||||
thread_fixture.push()
|
||||
self.setup_thread_page(thread.get("id")) # pylint: disable=no-member
|
||||
self.assertFalse(self.thread_page.has_add_response_button())
|
||||
self.assertFalse(self.thread_page.is_element_visible("action-more"))
|
||||
|
||||
def test_dual_discussion_xblock(self):
|
||||
"""
|
||||
Scenario: Two discussion xblocks in one unit shouldn't override their actions
|
||||
|
||||
Reference in New Issue
Block a user