Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
35d58b98
Commit
35d58b98
authored
Oct 28, 2013
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1516 from edx/zoldak/fix-component-test
Break out Advanced Problem tests into a Scenario Outline
parents
d8447436
380e7c42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
12 deletions
+18
-12
cms/djangoapps/contentstore/features/component.feature
+7
-12
cms/djangoapps/contentstore/features/component.py
+11
-0
No files found.
cms/djangoapps/contentstore/features/component.feature
View file @
35d58b98
...
...
@@ -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
|
...
...
cms/djangoapps/contentstore/features/component.py
View file @
35d58b98
...
...
@@ -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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment