'Verify move operations.
Arguments:
unit_page (Object)                                Unit container page.
source_component (Object)                         Source XBlock object to be moved.
operation (str),                                  `move` or `undo move` operation.
component_display_names_after_operation (dict)    Display names of components after operation in source/dest
should_verify_publish_title (Boolean)             Should verify publish title ot not. Default is True.'

def verify_move_opertions(self, unit_page, source_component, operation, component_display_names_after_operation, should_verify_publish_title=True):

    source_component.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)
    if should_verify_publish_title:
        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)
    if should_verify_publish_title:
        self.container.verify_publish_title(self.DRAFT_STATUS)
    if (operation == 'move'):
        self.container.click_take_me_there_link()
    elif (operation == 'undo_move'):
        self.container.click_undo_move_link()
        self.container.verify_confirmation_message(self.message_undo.format(display_name=self.source_component_display_name))
    unit_page = ContainerPage(self.browser, None)
    components = unit_page.displayed_children
    self.assertEqual([component.name for component in components], component_display_names_after_operation)
