Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
fb01d8fa
Commit
fb01d8fa
authored
11 years ago
by
David Baumgold
Browse files
Options
Downloads
Patches
Plain Diff
Fixes to avoid CSRF error in acceptance tests
parent
1007f5ae
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cms/djangoapps/contentstore/features/component.py
+9
-8
9 additions, 8 deletions
cms/djangoapps/contentstore/features/component.py
cms/static/coffee/src/main.coffee
+4
-3
4 additions, 3 deletions
cms/static/coffee/src/main.coffee
with
13 additions
and
11 deletions
cms/djangoapps/contentstore/features/component.py
+
9
−
8
View file @
fb01d8fa
...
...
@@ -5,6 +5,7 @@ from lettuce import world, step
from
nose.tools
import
assert_true
,
assert_in
,
assert_equal
# pylint: disable=E0611
from
common
import
create_studio_user
,
add_course_author
,
log_into_studio
@step
(
u
'
I am in Studio editing a new unit$
'
)
def
add_unit
(
step
):
world
.
clear_courses
()
...
...
@@ -18,7 +19,7 @@ def add_unit(step):
add_course_author
(
user
,
course
)
log_into_studio
()
world
.
wait_for_requirejs
([
"
jquery
"
,
"
js/models/course
"
,
"
coffee/src/models/module
"
,
"
jquery
"
,
"
gettext
"
,
"
js/models/course
"
,
"
coffee/src/models/module
"
,
"
coffee/src/views/unit
"
,
"
jquery.ui
"
,
])
world
.
wait_for_mathjax
()
...
...
@@ -39,13 +40,13 @@ def add_a_single_step_component(step):
css_selector
=
'
a[data-type=
"
{}
"
]
'
.
format
(
component
.
lower
())
world
.
css_click
(
css_selector
)
# In the current implementation, all the "new component"
# buttons are handled by one BackBone.js view.
# If we click two buttons at super-human speed,
# the view will miss the second click while it's
# processing the first.
# To account for this, we wait for each component
# to be created before clicking the next component.
# In the current implementation, all the "new component"
# buttons are handled by one BackBone.js view.
# If we click two buttons at super-human speed,
# the view will miss the second click while it's
# processing the first.
# To account for this, we wait for each component
# to be created before clicking the next component.
world
.
wait_for_visible
(
'
section.xmodule_{}Module
'
.
format
(
component
))
...
...
This diff is collapsed.
Click to expand it.
cms/static/coffee/src/main.coffee
+
4
−
3
View file @
fb01d8fa
define
[
"jquery"
,
"underscore.string"
,
"backbone"
,
"js/views/feedback_notification"
,
"jquery.cookie"
],
(
$
,
str
,
Backbone
,
NotificationView
)
->
define
[
"domReady"
,
"jquery"
,
"underscore.string"
,
"backbone"
,
"gettext"
,
"js/views/feedback_notification"
,
"jquery.cookie"
],
(
domReady
,
$
,
str
,
Backbone
,
gettext
,
NotificationView
)
->
AjaxPrefix
.
addAjaxPrefix
jQuery
,
->
$
(
"meta[name='path_prefix']"
).
attr
(
'content'
)
...
...
@@ -36,5 +37,5 @@ define ["jquery", "underscore.string", "backbone", "js/views/feedback_notificati
if
onTouchBasedDevice
()
$
(
'body'
).
addClass
'touch-based-device'
$
(
main
)
domReady
(
main
)
return
main
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment