Commit 35d58b98 by Jay Zoldak

Merge pull request #1516 from edx/zoldak/fix-component-test

Break out Advanced Problem tests into a Scenario Outline
parents d8447436 380e7c42
......@@ -43,19 +43,14 @@ Feature: CMS.Component Adding
| Numerical Input |
| Text Input |
Scenario: I can add Advanced Problem components
Scenario Outline: I can add Advanced Problem components
Given I am in Studio editing a new unit
When I add this type of Advanced Problem component:
| Component |
| Blank Advanced Problem |
| Circuit Schematic Builder |
| Custom Python-Evaluated Input |
| Drag and Drop |
| Image Mapped Input |
| Math Expression Input |
| Problem Written in LaTeX |
| Problem with Adaptive Hint |
Then I see Problem components in this order:
When I add a "<Component>" "Advanced Problem" component
Then I see a "<Component>" Problem component
# Flush out the database before the next example executes
And I reset the database
Examples:
| Component |
| Blank Advanced Problem |
| Circuit Schematic Builder |
......
......@@ -63,6 +63,17 @@ def see_a_multi_step_component(step, category):
assert_in(step_hash['Component'].upper(), actual_text)
@step(u'I see a "([^"]*)" Problem component$')
def see_a_problem_component(step, category):
component_css = 'section.xmodule_CapaModule'
assert_true(world.is_css_present(component_css),
'No problem was added to the unit.')
problem_css = 'li.component section.xblock-student_view'
actual_text = world.css_text(problem_css)
assert_in(category.upper(), actual_text)
@step(u'I add a "([^"]*)" "([^"]*)" component$')
def add_component_category(step, component, category):
assert category in ('single step', 'HTML', 'Problem', 'Advanced Problem')
......
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