diff --git a/common/test/acceptance/pages/studio/utils.py b/common/test/acceptance/pages/studio/utils.py index 1b1e360c7e..5ac2148234 100644 --- a/common/test/acceptance/pages/studio/utils.py +++ b/common/test/acceptance/pages/studio/utils.py @@ -87,6 +87,13 @@ def add_component(page, item_type, specific_type, is_advanced_problem=False): advanced_tab = page.q(css='.problem-type-tabs a').filter(text='Advanced').first advanced_tab.click() + # Wait for the advanced tab to be active + css = '.problem-type-tabs li.ui-tabs-active a' + page.wait_for( + lambda: len(page.q(css=css).filter(text='Advanced').execute()) > 0, + 'Waiting for the Advanced problem tab to be active' + ) + all_options = page.q(css='.new-component-{} ul.new-component-template li button span'.format(item_type)) chosen_option = all_options.filter(text=specific_type).first chosen_option.click() diff --git a/common/test/acceptance/tests/studio/test_studio_components.py b/common/test/acceptance/tests/studio/test_studio_components.py index 61c00cdf41..c4527cc631 100644 --- a/common/test/acceptance/tests/studio/test_studio_components.py +++ b/common/test/acceptance/tests/studio/test_studio_components.py @@ -15,8 +15,6 @@ class AdvancedProblemComponentTest(ContainerBase): Feature: CMS.Component Adding As a course author, I want to be able to add a wide variety of components """ - __test__ = True - def setUp(self, is_staff=True): """ Create a course with a section, subsection, and unit to which to add the component.