'Scenario: When group configuration is used, ensure that the links to units using a group configuration work correctly.
Given I have a course without group configurations
And I create new group configuration with 2 default groups
And I create a unit and assign the newly created group configuration
And open the Group Configuration page
Then I see a link to the newly created unit
When I click on the unit link
Then I see correct unit page'

def test_group_configuration_non_empty_usage(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}))
    unit = CourseOutlineUnit(self.browser, vertical.locator)
    self.page.visit()
    config = self.page.experiment_group_configurations[0]
    config.toggle()
    usage = config.usages[0]
    config.click_unit_anchor()
    unit = ContainerPage(self.browser, vertical.locator)
    unit.wait_for_page()
    self.assertIn(unit.name, usage)
