From 57b4cb7fb3f9b9a2bc4dc6b553940596bfc6d1bc Mon Sep 17 00:00:00 2001 From: Brian Jacobel Date: Wed, 1 Jun 2016 15:26:30 -0400 Subject: [PATCH] Move the flaky focus unit test removed in #12433 to a bok choy test --- .../tests/studio/test_studio_split_test.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/common/test/acceptance/tests/studio/test_studio_split_test.py b/common/test/acceptance/tests/studio/test_studio_split_test.py index e6f3ba26a1..7c5ca25773 100644 --- a/common/test/acceptance/tests/studio/test_studio_split_test.py +++ b/common/test/acceptance/tests/studio/test_studio_split_test.py @@ -482,6 +482,36 @@ class GroupConfigurationsTest(ContainerBase, SplitTestMixin): groups=["First Group", "Group C", "Group D"] ) + def test_focus_management_in_experiment_group_inputs(self): + """ + 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 + """ + self.page.visit() + self.page.create_experiment_group_configuration() + config = self.page.experiment_group_configurations[0] + group_a = config.groups[0] + + # Assert the fieldset doesn't have .is-focused class + self.assertFalse(self.page.q(css="fieldset.groups-fields.is-focused").visible) + + # Click on the Group A input field + self.page.q(css=group_a.prefix).click() + + # Assert the fieldset has .is-focused class applied + self.assertTrue(self.page.q(css="fieldset.groups-fields.is-focused").visible) + + # Click away + self.page.q(css=".page-header").click() + + # Assert the fieldset doesn't have .is-focused class + self.assertFalse(self.page.q(css="fieldset.groups-fields.is-focused").visible) + def test_use_group_configuration(self): """ Scenario: Ensure that the group configuration can be used by split_module correctly