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
d9ba4103
Commit
d9ba4103
authored
Oct 10, 2013
by
Julian Arni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review fixes
parent
9798da41
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
12 deletions
+9
-12
cms/djangoapps/contentstore/features/course_import.py
+0
-2
cms/djangoapps/contentstore/features/problem-editor.feature
+1
-1
cms/djangoapps/contentstore/features/problem-editor.py
+7
-6
cms/djangoapps/contentstore/views/import_export.py
+1
-3
No files found.
cms/djangoapps/contentstore/features/import.py
→
cms/djangoapps/contentstore/features/
course_
import.py
View file @
d9ba4103
...
...
@@ -2,7 +2,6 @@ import os
from
lettuce
import
world
from
django.conf
import
settings
@world.absorb
def
import_file
(
filename
):
world
.
browser
.
execute_script
(
"$('input.file-input').css('display', 'block')"
)
path
=
os
.
path
.
join
(
settings
.
COMMON_TEST_DATA_ROOT
,
"imports"
,
filename
)
...
...
@@ -14,7 +13,6 @@ def import_file(filename):
world
.
css_click
(
outline_css
)
@world.absorb
def
go_to_import
():
menu_css
=
'li.nav-course-tools'
import_css
=
'li.nav-course-tools-import a'
...
...
cms/djangoapps/contentstore/features/problem-editor.feature
View file @
d9ba4103
...
...
@@ -95,7 +95,7 @@ Feature: CMS.Problem Editor
And
I go to the import page
And
I import the file
"get_html_exception_test.tar.gz"
When
I go to the unit
"Probability and BMI"
And
I click on
the link
"edit a draft"
And
I click on
"edit a draft"
Then
I see a message that says
"We're having trouble rendering your component"
And
I can edit the problem
cms/djangoapps/contentstore/features/problem-editor.py
View file @
d9ba4103
...
...
@@ -6,6 +6,7 @@ import json
from
lettuce
import
world
,
step
from
nose.tools
import
assert_equal
,
assert_true
# pylint: disable=E0611
from
common
import
type_in_codemirror
,
open_new_course
from
course_import
import
import_file
,
go_to_import
DISPLAY_NAME
=
"Display Name"
...
...
@@ -206,17 +207,17 @@ def i_have_empty_course(step):
@step
(
u'I go to the import page'
)
def
i_go_to_import
(
_step
):
world
.
go_to_import
()
go_to_import
()
@step
(
u'I import the file "([^"]*)"$'
)
def
i_import_the_file
(
_step
,
filename
):
world
.
import_file
(
filename
)
import_file
(
filename
)
@step
(
u'I click on
the link "([^"]*)
"$'
)
def
i_
click_on
(
_step
,
link
):
world
.
browser
.
click_link_by_text
(
link
)
@step
(
u'I click on
"edit a draft
"$'
)
def
i_
edit_a_draft
(
_step
):
world
.
css_click
(
"a.create-draft"
)
@step
(
u'I go to the vertical "([^"]*)"$'
)
...
...
@@ -233,7 +234,7 @@ def i_go_to_unit(_step, unit):
@step
(
u'I see a message that says "([^"]*)"$'
)
def
i_can_see_message
(
_step
,
msg
):
msg
=
json
.
dumps
(
msg
)
# escape quotes
world
.
browser
.
is_text_present
(
msg
)
world
.
css_has_text
(
"h2.title"
,
msg
)
@step
(
u'I can edit the problem$'
)
...
...
cms/djangoapps/contentstore/views/import_export.py
View file @
d9ba4103
...
...
@@ -35,8 +35,6 @@ from .access import get_location_and_verify_access
from
util.json_request
import
JsonResponse
from
extract_tar
import
safetar_extractall
import
traceback
__all__
=
[
'import_course'
,
'import_status'
,
'generate_export_course'
,
'export_course'
]
...
...
@@ -230,7 +228,7 @@ def import_course(request, org, course, name):
except
Exception
as
exception
:
# pylint: disable=W0703
return
JsonResponse
(
{
'ErrMsg'
:
str
(
exception
)
+
traceback
.
format_exc
()
,
'ErrMsg'
:
str
(
exception
),
'Stage'
:
session_status
[
key
]
},
status
=
400
...
...
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