Wait for the Advanced problem tab to be active. Remove the __test__ signifier.

This commit is contained in:
Jesse Zoldak
2016-03-02 12:12:00 -05:00
parent 2c8148c7bc
commit 9ebfc49b93
2 changed files with 7 additions and 2 deletions

View File

@@ -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()

View File

@@ -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.