'Verify that the specified xblock\'s preview has the expected HTML elements.'

def validate_preview_html(self, xblock, view_name, can_add=True, can_reorder=True, can_move=True, can_edit=True, can_duplicate=True, can_delete=True):

    html = self.get_preview_html(xblock, view_name)
    self.validate_html_for_action_button(html, '<div    class="add-xblock-component    new-component-item    adding"></div>', can_add)
    self.validate_html_for_action_button(html, '<span    data-tooltip="Drag    to    reorder"    class="drag-handle    action"></span>', can_reorder)
    self.validate_html_for_action_button(html, '<button    data-tooltip="Move"    class="btn-default    move-button    action-button">', can_move)
    self.validate_html_for_action_button(html, 'button    class="btn-default    edit-button    action-button">', can_edit)
    self.validate_html_for_action_button(html, '<button    data-tooltip="Delete"    class="btn-default    delete-button    action-button">', can_duplicate)
    self.validate_html_for_action_button(html, '<button    data-tooltip="Duplicate"    class="btn-default    duplicate-button    action-button">', can_delete)
