<h3class="title-3">${_("What can I do on this page?")}</h3>
<p>${_("You can create and edit group configurations.")}</p>
<p>${_("A group configuration defines how many groups of students are in an experiment. When you create a content experiment, you select the group configuration to use.")}</p>
<p>${_("Click {em_start}New Group Configuration{em_end} to add a new configuration. To edit an existing configuration, hover over its box and click {em_start}Edit{em_end}.").format(em_start='<strong>', em_end="</strong>")}</p>
<span class="group-configuration-value"><%= id %></span>
</span><%
}
%>
<input id="group-configuration-name-<%= uniqueId %>" class="group-configuration-name-input input-text" name="group-configuration-name" type="text" placeholder="<%= gettext("This is the Name of the Group Configuration") %>" value="<%= name %>">
<input id="group-configuration-name-<%= uniqueId %>" class="group-configuration-name-input input-text" name="group-configuration-name" type="text" placeholder="<%= gettext("This is the Name of the Group Configuration") %>" value="<%= name %>">
<span class="tip tip-stacked"><%= gettext("Name or short description of the configuration") %></span>
<span class="tip tip-stacked"><%= gettext("Name or short description of the configuration") %></span>
Scenario: Ensure that editing of the group configuration can be canceled correctly.
Given I have a course with group configuration
When I go to the edit mode of the group configuration
And I set new name and description
And I click button 'Cancel'
Then I see that new changes were discarded
"""
self.course_fix.add_advanced_settings({
u"user_partitions":{
"value":[
UserPartition(0,'Name of the Group Configuration','Description of the group configuration.',[Group("0",'Group 0'),Group("1",'Group 1')]).to_json(),
UserPartition(1,'Name of second Group Configuration','Second group configuration.',[Group("0",'Alpha'),Group("1",'Beta'),Group("2",'Gamma')]).to_json()
],
},
})
self.course_fix._add_advanced_settings()
self.page.visit()
config=self.page.group_configurations()[0]
config.name="New Group Configuration Name"
config.description="New Description of the group configuration."
# Cancel the configuration
config.cancel()
self._assert_fields(
config,
name="Name of the Group Configuration",
description="Description of the group configuration.",
groups=["Group 0","Group 1"]
)
deftest_group_configuration_validation(self):
deftest_group_configuration_validation(self):
"""
"""
Ensure that validation of the group configuration works correctly.
Scenario: Ensure that validation of the group configuration works correctly.
Given I have a course without group configurations
And I create new group configuration with 2 default groups
When I set only description and try to save
Then I see error message "Group Configuration name is required"
When I set new name and try to save
Then I see the group configuration is saved successfully
"""
"""
self.page.visit()
self.page.visit()
...
@@ -387,11 +518,10 @@ class GroupConfigurationsTest(ContainerBase):
...
@@ -387,11 +518,10 @@ class GroupConfigurationsTest(ContainerBase):
config.name="Name of the Group Configuration"
config.name="Name of the Group Configuration"
# Save the configuration
# Save the configuration
config.save()
config.save()
# Verify the configuration is saved and it is shown in `details` mode.
self.assertEqual(config.mode,'details')
self._assert_fields(
# Verify the configuration for the data correctness
config,
self.assertIn("Name of the Group Configuration",config.name)
name="Name of the Group Configuration",
self.assertTrue(config.id)
description="Description of the group configuration.",
# Expand the configuration
groups=["Group A","Group B"]
config.toggle()
)
self.assertIn("Description of the group configuration.",config.description)