'Scenario: Ensure that selecting the focus inputs in the groups list
sets the .is-focused class on the fieldset
Given I have a course with experiment group configurations
When I click the name of the first group
Then the fieldset wrapping the group names whould get class .is-focused
When I click away from the first group
Then the fieldset should not have class .is-focused anymore'

def test_focus_management_in_experiment_group_inputs(self):

    self.page.visit()
    self.page.create_experiment_group_configuration()
    config = self.page.experiment_group_configurations[0]
    group_a = config.groups[0]
    self.assertFalse(self.page.q(css='fieldset.groups-fields.is-focused').visible)
    self.page.q(css=group_a.prefix).click()
    self.assertTrue(self.page.q(css='fieldset.groups-fields.is-focused').visible)
    self.page.q(css='.page-header').click()
    self.assertFalse(self.page.q(css='fieldset.groups-fields.is-focused').visible)
