'Scenario: divide a course-wide discussion topic.
Given I have a course with a divide defined,
And a course-wide discussion with disabled Save button.
When I click on the course-wide discussion topic
Then I see the enabled save button
When I click on save button
Then I see success message
When I reload the page
Then I see the discussion topic selected'

def test_divide_course_wide_discussion_topic(self):

    self.check_discussion_topic_visibility()
    divided_topics_before = self.discussion_management_page.get_divided_topics_count(self.course_wide_key)
    self.discussion_management_page.select_discussion_topic(self.course_wide_key)
    self.assertFalse(self.discussion_management_page.is_save_button_disabled(self.course_wide_key))
    self.save_and_verify_discussion_topics(key=self.course_wide_key)
    divided_topics_after = self.discussion_management_page.get_divided_topics_count(self.course_wide_key)
    self.assertNotEqual(divided_topics_before, divided_topics_after)
    self.verify_discussion_topics_after_reload(self.course_wide_key, divided_topics_after)
