Fix flaky test_automatic_cohort_help bokchoy test
TNL-5709
This commit is contained in:
@@ -409,6 +409,9 @@ class CohortManagementSection(PageObject):
|
||||
if content_group:
|
||||
self._select_associated_content_group(content_group)
|
||||
self.save_cohort_settings()
|
||||
EmptyPromise(
|
||||
lambda: cohort_name == self.get_selected_cohort(), "Waiting for new cohort"
|
||||
).fulfill()
|
||||
|
||||
def get_cohort_group_setup(self):
|
||||
"""
|
||||
|
||||
@@ -250,10 +250,6 @@ class CohortConfigurationTest(EventsTestMixin, UniqueCourseTest, CohortTestMixin
|
||||
start_time = datetime.now(UTC)
|
||||
self.assertNotIn(cohort_name, self.cohort_management_page.get_cohorts())
|
||||
self.cohort_management_page.add_cohort(cohort_name, assignment_type=assignment_type)
|
||||
# After adding the cohort, it should automatically be selected
|
||||
EmptyPromise(
|
||||
lambda: cohort_name == self.cohort_management_page.get_selected_cohort(), "Waiting for new cohort to appear"
|
||||
).fulfill()
|
||||
self.assertEqual(0, self.cohort_management_page.get_selected_cohort_count())
|
||||
# After adding the cohort, it should automatically be selected and its
|
||||
# assignment_type should be "manual" as this is the default assignment type
|
||||
@@ -1154,11 +1150,6 @@ class CohortContentGroupAssociationTest(UniqueCourseTest, CohortTestMixin):
|
||||
Creates a new cohort linked to a content group.
|
||||
"""
|
||||
self.cohort_management_page.add_cohort(new_cohort, content_group=cohort_group)
|
||||
# After adding the cohort, it should automatically be selected
|
||||
EmptyPromise(
|
||||
lambda: new_cohort == self.cohort_management_page.get_selected_cohort(),
|
||||
"Waiting for new cohort to appear"
|
||||
).fulfill()
|
||||
self.assertEqual(cohort_group, self.cohort_management_page.get_cohort_associated_content_group())
|
||||
|
||||
def _link_cohort_to_content_group(self, cohort_name, content_group):
|
||||
|
||||
@@ -207,10 +207,6 @@ class CoursewareSearchCohortTest(ContainerBase):
|
||||
Create cohort and assign student to it.
|
||||
"""
|
||||
cohort_management_page.add_cohort(cohort_name, content_group=content_group)
|
||||
# After adding the cohort, it should automatically be selected
|
||||
EmptyPromise(
|
||||
lambda: cohort_name == cohort_management_page.get_selected_cohort(), "Waiting for new cohort"
|
||||
).fulfill()
|
||||
cohort_management_page.add_students_to_selected_cohort([student])
|
||||
add_cohort_with_student("Cohort A", self.content_group_a, self.cohort_a_student_username)
|
||||
add_cohort_with_student("Cohort B", self.content_group_b, self.cohort_b_student_username)
|
||||
|
||||
@@ -70,7 +70,6 @@ class TestCohortHelp(ContainerBase):
|
||||
|
||||
self.verify_help_link(href)
|
||||
|
||||
@flaky # TODO fix this, see TNL-5709
|
||||
def test_automatic_cohort_help(self):
|
||||
"""
|
||||
Scenario: Help in 'What does it mean?' is correct when we create cohort automatically.
|
||||
|
||||
@@ -360,10 +360,6 @@ class CourseWithContentGroupsTest(StaffViewTest):
|
||||
def add_cohort_with_student(cohort_name, content_group, student):
|
||||
""" Create cohort and assign student to it. """
|
||||
cohort_management_page.add_cohort(cohort_name, content_group=content_group)
|
||||
# After adding the cohort, it should automatically be selected
|
||||
EmptyPromise(
|
||||
lambda: cohort_name == cohort_management_page.get_selected_cohort(), "Waiting for new cohort"
|
||||
).fulfill()
|
||||
cohort_management_page.add_students_to_selected_cohort([student])
|
||||
add_cohort_with_student("Cohort Alpha", "alpha", student_a_username)
|
||||
add_cohort_with_student("Cohort Beta", "beta", student_b_username)
|
||||
|
||||
@@ -147,10 +147,6 @@ class EndToEndCohortedCoursewareTest(ContainerBase):
|
||||
|
||||
def add_cohort_with_student(cohort_name, content_group, student):
|
||||
cohort_management_page.add_cohort(cohort_name, content_group=content_group)
|
||||
# After adding the cohort, it should automatically be selected
|
||||
EmptyPromise(
|
||||
lambda: cohort_name == cohort_management_page.get_selected_cohort(), "Waiting for new cohort"
|
||||
).fulfill()
|
||||
cohort_management_page.add_students_to_selected_cohort([student])
|
||||
|
||||
add_cohort_with_student("Cohort A", self.content_group_a, self.cohort_a_student_username)
|
||||
|
||||
Reference in New Issue
Block a user