Commit efc6a308 by Will Daly

Merge pull request #444 from edx/will/fix-acceptance-tests

Will/fix acceptance tests
parents 011ceb8e 76a63a6e
...@@ -10,6 +10,7 @@ Feature: Course checklists ...@@ -10,6 +10,7 @@ Feature: Course checklists
Then I can check and uncheck tasks in a checklist Then I can check and uncheck tasks in a checklist
And They are correctly selected after I reload the page And They are correctly selected after I reload the page
@skip
Scenario: A task can link to a location within Studio Scenario: A task can link to a location within Studio
Given I have opened Checklists Given I have opened Checklists
When I select a link to the course outline When I select a link to the course outline
......
...@@ -209,7 +209,8 @@ def i_created_a_video_component(step): ...@@ -209,7 +209,8 @@ def i_created_a_video_component(step):
world.create_component_instance( world.create_component_instance(
step, '.large-video-icon', step, '.large-video-icon',
'video', 'video',
'.xmodule_VideoModule' '.xmodule_VideoModule',
has_multiple_templates=False
) )
......
...@@ -7,10 +7,16 @@ from terrain.steps import reload_the_page ...@@ -7,10 +7,16 @@ from terrain.steps import reload_the_page
@world.absorb @world.absorb
def create_component_instance(step, component_button_css, category, expected_css, boilerplate=None): def create_component_instance(step, component_button_css, category,
expected_css, boilerplate=None,
has_multiple_templates=True):
click_new_component_button(step, component_button_css) click_new_component_button(step, component_button_css)
click_component_from_menu(category, boilerplate, expected_css)
if has_multiple_templates:
click_component_from_menu(category, boilerplate, expected_css)
assert_equal(1, len(world.css_find(expected_css)))
@world.absorb @world.absorb
def click_new_component_button(step, component_button_css): def click_new_component_button(step, component_button_css):
...@@ -34,7 +40,6 @@ def click_component_from_menu(category, boilerplate, expected_css): ...@@ -34,7 +40,6 @@ def click_component_from_menu(category, boilerplate, expected_css):
elements = world.css_find(elem_css) elements = world.css_find(elem_css)
assert_equal(len(elements), 1) assert_equal(len(elements), 1)
world.css_click(elem_css) world.css_click(elem_css)
assert_equal(1, len(world.css_find(expected_css)))
@world.absorb @world.absorb
......
...@@ -9,7 +9,8 @@ def i_created_discussion_tag(step): ...@@ -9,7 +9,8 @@ def i_created_discussion_tag(step):
world.create_component_instance( world.create_component_instance(
step, '.large-discussion-icon', step, '.large-discussion-icon',
'discussion', 'discussion',
'.xmodule_DiscussionModule' '.xmodule_DiscussionModule',
has_multiple_templates=False
) )
......
...@@ -170,7 +170,8 @@ def edit_latex_source(step): ...@@ -170,7 +170,8 @@ def edit_latex_source(step):
@step('my change to the High Level Source is persisted') @step('my change to the High Level Source is persisted')
def high_level_source_persisted(step): def high_level_source_persisted(step):
def verify_text(driver): def verify_text(driver):
return world.css_text('.problem') == 'hi' css_sel = '.problem div>span'
return world.css_text(css_sel) == 'hi'
world.wait_for(verify_text) world.wait_for(verify_text)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment