'Edit the visibility of an xblock on the container page and
verify that the edit persists. Note that `groups`
are labels which should be clicked, but not necessarily checked.'

def select_and_verify_saved(self, component, partition_label, groups=[]):

    visibility_editor = self.edit_component_visibility(component)
    visibility_editor.select_groups_in_partition_scheme(partition_label, groups)
    if (not groups):
        partition_label = self.CHOOSE_ONE
    visibility_editor = self.edit_component_visibility(component)
    self.verify_selected_partition_scheme(visibility_editor, partition_label)
    self.verify_selected_groups(visibility_editor, groups)
    visibility_editor.save()
