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
50dc93dc
Commit
50dc93dc
authored
Sep 27, 2013
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-enable the component acceptance tests
parent
e73bc906
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
212 additions
and
192 deletions
+212
-192
cms/djangoapps/contentstore/features/common.py
+13
-7
cms/djangoapps/contentstore/features/component.feature
+78
-76
cms/djangoapps/contentstore/features/component.py
+121
-109
No files found.
cms/djangoapps/contentstore/features/common.py
View file @
50dc93dc
...
...
@@ -168,6 +168,18 @@ def log_into_studio(
assert_in
(
uname
,
world
.
css_text
(
'h2.title'
,
timeout
=
10
))
def
add_course_author
(
user
,
course
):
"""
Add the user to the instructor group of the course
so they will have the permissions to see it in studio
"""
for
role
in
(
"staff"
,
"instructor"
):
groupname
=
get_course_groupname_for_role
(
course
.
location
,
role
)
group
,
__
=
Group
.
objects
.
get_or_create
(
name
=
groupname
)
user
.
groups
.
add
(
group
)
user
.
save
()
def
create_a_course
():
course
=
world
.
CourseFactory
.
create
(
org
=
'MITx'
,
course
=
'999'
,
display_name
=
'Robot Super Course'
)
world
.
scenario_dict
[
'COURSE'
]
=
course
...
...
@@ -176,13 +188,7 @@ def create_a_course():
if
not
user
:
user
=
get_user_by_email
(
'robot+studio@edx.org'
)
# Add the user to the instructor group of the course
# so they will have the permissions to see it in studio
for
role
in
(
"staff"
,
"instructor"
):
groupname
=
get_course_groupname_for_role
(
course
.
location
,
role
)
group
,
__
=
Group
.
objects
.
get_or_create
(
name
=
groupname
)
user
.
groups
.
add
(
group
)
user
.
save
()
add_course_author
(
user
,
course
)
# Navigate to the studio dashboard
world
.
visit
(
'/'
)
...
...
cms/djangoapps/contentstore/features/component.feature
View file @
50dc93dc
...
...
@@ -2,85 +2,87 @@
Feature
:
CMS.Component Adding
As a course author, I want to be able to add a wide variety of components
#Scenario: I can add components
# Given I have opened a new course in studio
# And I am editing a new unit
# When I add the following components:
# | Component |
# | Discussion |
# | Blank HTML |
# | LaTex |
# | Blank Problem|
# | Dropdown |
# | Multi Choice |
# | Numerical |
# | Text Input |
# | Advanced |
# | Circuit |
# | Custom Python|
# | Image Mapped |
# | Math Input |
# | Problem LaTex|
# | Adaptive Hint|
# | Video |
# Then I see the following components:
# | Component |
# | Discussion |
# | Blank HTML |
# | LaTex |
# | Blank Problem|
# | Dropdown |
# | Multi Choice |
# | Numerical |
# | Text Input |
# | Advanced |
# | Circuit |
# | Custom Python|
# | Image Mapped |
# | Math Input |
# | Problem LaTex|
# | Adaptive Hint|
# | Video |
Scenario
:
I
can add single step components
Given
I am in Studio editing a new unit
When I add this type of single step component
:
|
Component
|
|
Discussion
|
|
Video
|
Then I see this type of single step component
:
|
Component
|
|
Discussion
|
|
Video
|
#Scenario: I can delete Components
# Given I have opened a new course in studio
# And I am editing a new unit
# And I add the following components:
# | Component |
# | Discussion |
# | Blank HTML |
# | LaTex |
# | Blank Problem|
# | Dropdown |
# | Multi Choice |
# | Numerical |
# | Text Input |
# | Advanced |
# | Circuit |
# | Custom Python|
# | Image Mapped |
# | Math Input |
# | Problem LaTex|
# | Adaptive Hint|
# | Video |
# When I will confirm all alerts
# And I delete all components
# Then I see no components
Scenario
:
I
can add HTML components
Given
I am in Studio editing a new unit
When I add this type of HTML component
:
|
Component
|
|
Text
|
|
Announcement
|
|
E-text
Written
in
LaTeX
|
Then I see HTML components in this order
:
|
Component
|
|
Text
|
|
Announcement
|
|
E-text
Written
in
LaTeX
|
Scenario
:
I
can add Common Problem components
Given
I am in Studio editing a new unit
When I add this type of Problem component
:
|
Component
|
|
Blank
Common
Problem
|
|
Dropdown
|
|
Multiple
Choice
|
|
Numerical
Input
|
|
Text
Input
|
Then I see Problem components in this order
:
|
Component
|
|
Blank
Common
Problem
|
|
Dropdown
|
|
Multiple
Choice
|
|
Numerical
Input
|
|
Text
Input
|
Scenario
:
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
:
|
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
|
Scenario
:
I
see a prompt on delete
Given
I have opened a new course in studio
And
I am editing a new unit
And I add the following components
:
|
Component
|
|
Discussion
|
And
I delete a component
Then
I am shown a prompt
Given
I am in Studio editing a new unit
And
I add a
"Discussion"
"single step"
component
And
I delete a component
Then
I am shown a prompt
Scenario
:
I
can delete Components
Given
I am in Studio editing a new unit
And
I add a
"Discussion"
"single step"
component
And
I add a
"Text"
"HTML"
component
And
I add a
"Blank Common Problem"
"Problem"
component
And
I add a
"Blank Advanced Problem"
"Advanced Problem"
component
And
I delete all components
Then
I see no components
Scenario
:
I
see a notification on save
Given
I have opened a new course in studio
And
I am editing a new unit
And I add the following components
:
|
Component
|
|
Discussion
|
Scenario
:
I
see a notification on save
Given
I am in Studio editing a new unit
And
I add a
"Discussion"
"single step"
component
And
I edit and save a component
Then
I am shown a notification
cms/djangoapps/contentstore/features/component.py
View file @
50dc93dc
This diff is collapsed.
Click to expand it.
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