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
7d07309f
Commit
7d07309f
authored
May 29, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't call setFixtures. Can stomp on other tests.
parent
24707f8f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
12 deletions
+27
-12
cms/djangoapps/contentstore/features/problem-editor.feature
+6
-1
cms/djangoapps/contentstore/features/problem-editor.py
+13
-0
cms/static/coffee/spec/main_spec.coffee
+1
-1
cms/static/coffee/spec/views/feedback_spec.coffee
+1
-1
cms/static/coffee/spec/views/metadata_edit_spec.coffee
+2
-2
cms/static/coffee/spec/views/module_edit_spec.coffee
+1
-1
cms/static/coffee/spec/views/section_spec.coffee
+1
-1
cms/static/js/base.js
+0
-3
cms/templates/widgets/metadata-edit.html
+2
-2
No files found.
cms/djangoapps/contentstore/features/problem-editor.feature
View file @
7d07309f
...
...
@@ -13,6 +13,12 @@ Feature: Problem Editor
Then
I can modify the display name
And
my display name change is persisted on save
Scenario
:
User can specify special characters in String values
Given
I have created a Blank Common Problem
And
I edit and select Settings
Then
I can specify special characters in the display name
And
my special characters and persisted on save
Scenario
:
User can revert display name to unset
Given
I have created a Blank Common Problem
And
I edit and select Settings
...
...
@@ -59,4 +65,3 @@ Feature: Problem Editor
Given
I have created a LaTeX Problem
And
I edit and select Settings
Then
Edit High Level Source is visible
cms/djangoapps/contentstore/features/problem-editor.py
View file @
7d07309f
...
...
@@ -41,6 +41,16 @@ def my_display_name_change_is_persisted_on_save(step):
world
.
save_component_and_reopen
(
step
)
verify_modified_display_name
()
@step
(
'I can specify special characters in the display name'
)
def
i_can_modify_the_display_name_with_special_chars
(
step
):
world
.
get_setting_entry
(
DISPLAY_NAME
)
.
find_by_css
(
'.setting-input'
)[
0
]
.
fill
(
"updated '
\"
&"
)
verify_modified_display_name_with_special_chars
()
@step
(
'my special characters and persisted on save'
)
def
special_chars_persisted_on_save
(
step
):
world
.
save_component_and_reopen
(
step
)
verify_modified_display_name_with_special_chars
()
@step
(
'I can revert the display name to unset'
)
def
can_revert_display_name_to_unset
(
step
):
world
.
revert_setting_entry
(
DISPLAY_NAME
)
...
...
@@ -142,6 +152,9 @@ def verify_modified_randomization():
def
verify_modified_display_name
():
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
DISPLAY_NAME
),
DISPLAY_NAME
,
'modified'
,
True
)
def
verify_modified_display_name_with_special_chars
():
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
DISPLAY_NAME
),
DISPLAY_NAME
,
"updated '
\"
&"
,
True
)
def
verify_unset_display_name
():
world
.
verify_setting_entry
(
world
.
get_setting_entry
(
DISPLAY_NAME
),
DISPLAY_NAME
,
''
,
False
)
cms/static/coffee/spec/main_spec.coffee
View file @
7d07309f
...
...
@@ -27,7 +27,7 @@ describe "AJAX Errors", ->
tpl
=
readFixtures
(
'system-feedback.underscore'
)
beforeEach
->
s
etFixtures
(
$
(
"<script>"
,
{
id
:
"system-feedback-tpl"
,
type
:
"text/template"
}).
text
(
tpl
))
appendS
etFixtures
(
$
(
"<script>"
,
{
id
:
"system-feedback-tpl"
,
type
:
"text/template"
}).
text
(
tpl
))
appendSetFixtures
(
sandbox
({
id
:
"page-notification"
}))
@
requests
=
requests
=
[]
@
xhr
=
sinon
.
useFakeXMLHttpRequest
()
...
...
cms/static/coffee/spec/views/feedback_spec.coffee
View file @
7d07309f
tpl
=
readFixtures
(
'system-feedback.underscore'
)
beforeEach
->
s
etFixtures
(
sandbox
({
id
:
"page-alert"
}))
appendS
etFixtures
(
sandbox
({
id
:
"page-alert"
}))
appendSetFixtures
(
sandbox
({
id
:
"page-notification"
}))
appendSetFixtures
(
sandbox
({
id
:
"page-prompt"
}))
appendSetFixtures
(
$
(
"<script>"
,
{
id
:
"system-feedback-tpl"
,
type
:
"text/template"
}).
text
(
tpl
))
...
...
cms/static/coffee/spec/views/metadata_edit_spec.coffee
View file @
7d07309f
...
...
@@ -4,7 +4,7 @@ stringEntryTemplate = readFixtures('metadata-string-entry.underscore')
optionEntryTemplate
=
readFixtures
(
'metadata-option-entry.underscore'
)
beforeEach
->
s
etFixtures
(
$
(
"<script>"
,
{
id
:
"metadata-editor-tpl"
,
type
:
"text/template"
}).
text
(
editorTemplate
))
appendS
etFixtures
(
$
(
"<script>"
,
{
id
:
"metadata-editor-tpl"
,
type
:
"text/template"
}).
text
(
editorTemplate
))
appendSetFixtures
(
$
(
"<script>"
,
{
id
:
"metadata-number-entry"
,
type
:
"text/template"
}).
text
(
numberEntryTemplate
))
appendSetFixtures
(
$
(
"<script>"
,
{
id
:
"metadata-string-entry"
,
type
:
"text/template"
}).
text
(
stringEntryTemplate
))
appendSetFixtures
(
$
(
"<script>"
,
{
id
:
"metadata-option-entry"
,
type
:
"text/template"
}).
text
(
optionEntryTemplate
))
...
...
@@ -178,7 +178,7 @@ describe "CMS.Views.Metadata.String is a basic string input with clear functiona
assertValueInView
(
@
view
,
'Word cloud'
)
it
"can update its value in the view"
,
->
assertCanUpdateView
(
@
view
,
"updated"
)
assertCanUpdateView
(
@
view
,
"updated
'
\"
&
"
)
it
"has a clear method to revert to the model default"
,
->
assertClear
(
@
view
,
'default value'
)
...
...
cms/static/coffee/spec/views/module_edit_spec.coffee
View file @
7d07309f
...
...
@@ -4,7 +4,7 @@ describe "CMS.Views.ModuleEdit", ->
@
stubModule
.
id
=
'stub-id'
s
etFixtures
"""
appendS
etFixtures
"""
<li class="component" id="stub-id">
<div class="component-editor">
<div class="module-editor">
...
...
cms/static/coffee/spec/views/section_spec.coffee
View file @
7d07309f
...
...
@@ -29,7 +29,7 @@ describe "CMS.Views.SectionEdit", ->
feedback_tpl
=
readFixtures
(
'system-feedback.underscore'
)
beforeEach
->
s
etFixtures
(
$
(
"<script>"
,
{
id
:
"section-name-edit-tpl"
,
type
:
"text/template"
}).
text
(
tpl
))
appendS
etFixtures
(
$
(
"<script>"
,
{
id
:
"section-name-edit-tpl"
,
type
:
"text/template"
}).
text
(
tpl
))
appendSetFixtures
(
$
(
"<script>"
,
{
id
:
"system-feedback-tpl"
,
type
:
"text/template"
}).
text
(
feedback_tpl
))
spyOn
(
CMS
.
Views
.
SectionEdit
.
prototype
,
"switchToShowView"
)
.
andCallThrough
()
...
...
cms/static/js/base.js
View file @
7d07309f
...
...
@@ -825,6 +825,3 @@ function saveSetSectionScheduleDate(e) {
hideModal
();
});
}
cms/templates/widgets/metadata-edit.html
View file @
7d07309f
...
...
@@ -40,4 +40,4 @@
<
%
include
file=
"source-edit.html"
/>
% endif
<div
class=
"wrapper-comp-settings metadata_edit"
id=
"settings-tab"
data-metadata=
'${json.dumps(metadata_field_copy)}'
/>
\ No newline at end of file
<div
class=
"wrapper-comp-settings metadata_edit"
id=
"settings-tab"
data-metadata=
'${json.dumps(metadata_field_copy) | h}'
/>
\ No newline at end of file
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