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
c711bb60
Commit
c711bb60
authored
Jan 07, 2014
by
Christina Roberts
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2055 from edx/christina/amp
Tests for behavior of export with & in HTML and XML-based components
parents
61afc819
a80101dd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
6 deletions
+27
-6
cms/djangoapps/contentstore/features/component_settings_editor_helpers.py
+11
-0
cms/djangoapps/contentstore/features/course-export.feature
+8
-0
cms/djangoapps/contentstore/features/course-export.py
+7
-5
common/test/data/simple/html/toylab.html
+1
-1
No files found.
cms/djangoapps/contentstore/features/component_settings_editor_helpers.py
View file @
c711bb60
...
...
@@ -4,6 +4,7 @@
from
lettuce
import
world
from
nose.tools
import
assert_equal
,
assert_in
# pylint: disable=E0611
from
terrain.steps
import
reload_the_page
from
common
import
type_in_codemirror
@world.absorb
...
...
@@ -114,6 +115,16 @@ def edit_component():
world
.
css_click
(
'a.edit-button'
)
def
enter_xml_in_advanced_problem
(
step
,
text
):
"""
Edits an advanced problem (assumes only on page),
types the provided XML, and saves the component.
"""
world
.
edit_component
()
type_in_codemirror
(
0
,
text
)
world
.
save_component
(
step
)
@world.absorb
def
verify_setting_entry
(
setting
,
display_name
,
value
,
explicitly_set
):
"""
...
...
cms/djangoapps/contentstore/features/course-export.feature
View file @
c711bb60
...
...
@@ -9,3 +9,11 @@ Feature: Course export
And
I export the course
Then
I get an error dialog
And
I can click to go to the unit with the error
Scenario
:
User is directed to problem with & in it when export fails
Given
I am in Studio editing a new unit
When
I add a
"Blank Advanced Problem"
"Advanced Problem"
component
And
I edit and enter an ampersand
And
I export the course
Then
I get an error dialog
And
I can click to go to the unit with the error
cms/djangoapps/contentstore/features/course-export.py
View file @
c711bb60
...
...
@@ -2,7 +2,7 @@
#pylint: disable=C0111
from
lettuce
import
world
,
step
from
com
mon
import
type_in_codemirror
from
com
ponent_settings_editor_helpers
import
enter_xml_in_advanced_problem
from
nose.tools
import
assert_true
,
assert_equal
...
...
@@ -16,9 +16,7 @@ def i_export_the_course(step):
@step
(
'I edit and enter bad XML$'
)
def
i_enter_bad_xml
(
step
):
world
.
edit_component
()
type_in_codemirror
(
0
,
enter_xml_in_advanced_problem
(
step
,
"""<problem><h1>Smallest Canvas</h1>
<p>You want to make the smallest canvas you can.</p>
<multiplechoiceresponse>
...
...
@@ -29,7 +27,11 @@ def i_enter_bad_xml(step):
</multiplechoiceresponse>
</problem>"""
)
world
.
save_component
(
step
)
@step
(
'I edit and enter an ampersand$'
)
def
i_enter_bad_xml
(
step
):
enter_xml_in_advanced_problem
(
step
,
"<problem>&</problem>"
)
@step
(
'I get an error dialog$'
)
...
...
common/test/data/simple/html/toylab.html
View file @
c711bb60
<b>
Lab 2A: Superposition Experiment
</b>
<p>
Isn't the toy course great?
</p>
<p>
Isn't the toy course great?
&
</p>
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