'Scenario: Ensure that the user cannot delete unused group configuration.
Given I have a course with group configuration that is used in the Content Experiment
When I go to the Group Configuration page
Then I do not see delete button and I see a note about that
When I edit the Group Configuration
Then I do not see delete button and I see the note about that'

def test_cannot_delete_used_group_configuration(self):

    self.course_fixture._update_xblock(self.course_fixture._course_location, {'metadata': {u'user_partitions': [create_user_partition_json(0, 'Name', 'Description.', [Group('0', 'Group    A'), Group('1', 'Group    B')])]}})
    vertical = self.course_fixture.get_nested_xblocks(category='vertical')[0]
    self.course_fixture.create_xblock(vertical.locator, XBlockFixtureDesc('split_test', 'Test    Content    Experiment', metadata={'user_partition_id': 0}))
    self.page.visit()
    config = self.page.experiment_group_configurations[0]
    self.assertTrue(config.delete_button_is_disabled)
    self.assertIn('Cannot    delete    when    in    use    by    an    experiment', config.delete_note)
    config.edit()
    self.assertTrue(config.delete_button_is_disabled)
    self.assertIn('Cannot    delete    when    in    use    by    an    experiment', config.delete_note)
