From df9f80ffafc3273c38d19f43533838301c1fd52b Mon Sep 17 00:00:00 2001 From: Tim Babych Date: Tue, 26 Aug 2014 13:37:43 +0300 Subject: [PATCH] Add test for at least one group before saving a group configuration --- .../test/acceptance/tests/test_studio_split_test.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/common/test/acceptance/tests/test_studio_split_test.py b/common/test/acceptance/tests/test_studio_split_test.py index 01bfc01160..f87c2c3209 100644 --- a/common/test/acceptance/tests/test_studio_split_test.py +++ b/common/test/acceptance/tests/test_studio_split_test.py @@ -644,9 +644,9 @@ class GroupConfigurationsTest(ContainerBase, SplitTestMixin): When I set a name And I delete the name of one of the groups and try to save Then I see error message "All groups must have a name" - When I delete the group without name and try to save - Then I see error message "Please add at least two groups." - When I add new group and try to save + When I delete all the groups and try to save + Then I see error message "There must be at least one group." + When I add a group and try to save Then I see the group configuration is saved successfully """ def try_to_save_and_verify_error_message(message): @@ -670,7 +670,9 @@ class GroupConfigurationsTest(ContainerBase, SplitTestMixin): config.name = "Name of the Group Configuration" config.groups[1].name = '' try_to_save_and_verify_error_message("All groups must have a name.") - config.groups[1].remove() + config.groups[0].remove() + config.groups[0].remove() + try_to_save_and_verify_error_message("There must be at least one group.") config.add_group() # Save the configuration @@ -680,7 +682,7 @@ class GroupConfigurationsTest(ContainerBase, SplitTestMixin): config, name="Name of the Group Configuration", description="Description of the group configuration.", - groups=["Group A", "Group B"] + groups=["Group A"] ) def test_group_configuration_empty_usage(self):