Break out Advanced Problem tests into a Scenario Outline
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user