'Scenario: When a Content Experiment uses a Group Configuration, ensure
that a warning validation message appears if necessary.
Given I have a course with a Group Configuration containing three Groups
And a Content Experiment is assigned to that Group Configuration
When I go to the Group Configuration Page
Then I do not see a warning icon and message in the Group Configuration details view.
When I remove a Group
Then I see a warning icon and message in the Group Configuration details view'

def test_details_warning_validation_message(self):

    (config, _) = self.create_group_configuration_experiment([Group('0', 'Group    A'), Group('1', 'Group    B'), Group('2', 'Group    C')], True)
    config.toggle()
    self.assertFalse(config.details_warning_icon_is_present)
    self.assertFalse(config.details_message_is_present)
    config.toggle()
    config.edit()
    config.groups[2].remove()
    config.save()
    config.toggle()
    self.assertTrue(config.details_warning_icon_is_present)
    self.assertTrue(config.details_message_is_present)
    self.assertIn('This    content    experiment    has    issues    that    affect    content    visibility.', config.details_message_text)
