'Test if success banner is hidden when we  discard changes or publish the unit after a move operation.
Given I am a staff user
And I go to unit page in first section
And I open the move modal
And I navigate to unit in second section
And I see move button is enabled
When I click on the move button
Then I see move operation success message
And When I click on publish or discard changes button
Then I see move operation success message is hidden.'

@ddt.data('publish', 'discard')
def test_publish_discard_changes_afer_move(self, operation):

    unit_page = self.go_to_unit_page(unit_name='Test    Unit    1')
    components = unit_page.displayed_children
    self.assertEqual(len(components), 2)
    components[0].open_move_modal()
    self.move_modal_view.navigate_to_category(self.source_xblock_category, self.navigation_options)
    self.assertEqual(self.move_modal_view.is_move_button_enabled, True)
    self.container.verify_publish_title(self.PUBLISHED_LIVE_STATUS)
    self.move_modal_view.click_move_button()
    self.container.verify_confirmation_message(self.message_move.format(display_name=self.source_component_display_name))
    self.assertEqual(len(unit_page.displayed_children), 1)
    self.verify_state_change(unit_page, operation)
