'Scenario: Ensure that the content groups can be created and edited correctly.
Given I have a course without content groups
When I click button \'Add your first Content Group\'
And I set new the name and click the button \'Create\'
Then I see the new content is added and has correct data
And I click \'New Content Group\' button
And I set the name and click the button \'Create\'
Then I see the second content group is added and has correct data
When I edit the second content group
And I change the name and click the button \'Save\'
Then I see the second content group is saved successfully and has the new name'

def test_can_create_and_edit_content_groups(self):

    self.group_configurations_page.visit()
    self.create_and_verify_content_group(u'New    Content    Group', 0)
    second_config = self.create_and_verify_content_group(u'Second    Content    Group', 1)
    second_config.edit()
    second_config.name = u'Updated    Second    Content    Group'
    self.assertEqual(second_config.get_text(u'.action-primary'), u'Save')
    second_config.save()
    self.assertIn(u'Updated    Second    Content    Group', second_config.name)
