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
3eb00186
Commit
3eb00186
authored
Jan 22, 2014
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ordinal in duplication statement friendlier.
parent
a1cb0a12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
cms/djangoapps/contentstore/features/component.feature
+1
-1
cms/djangoapps/contentstore/features/component.py
+8
-2
No files found.
cms/djangoapps/contentstore/features/component.feature
View file @
3eb00186
...
...
@@ -106,7 +106,7 @@ Feature: CMS.Component Adding
Given
I am in Studio editing a new unit
And
I add a
"Blank Common Problem"
"Problem"
component
And
I add a
"Multiple Choice"
"Problem"
component
And
I duplicate the
"0"
component
And
I duplicate the
first
component
Then
I see a Problem component with display name
"Duplicate of 'Blank Common Problem'"
in position
"1"
And
I reload the page
Then
I see a Problem component with display name
"Blank Common Problem"
in position
"0"
...
...
cms/djangoapps/contentstore/features/component.py
View file @
3eb00186
...
...
@@ -134,8 +134,14 @@ def edit_and_save_component(step):
world
.
css_click
(
'.save-button'
)
@step
(
u'I duplicate the "([^"]*)" component$'
)
def
duplicated_component
(
step
,
index
):
@step
(
u'I duplicate the (first|second|third) component$'
)
def
duplicated_component
(
step
,
ordinal
):
ord_map
=
{
"first"
:
0
,
"second"
:
1
,
"third"
:
2
,
}
index
=
ord_map
[
ordinal
]
duplicate_btn_css
=
'a.duplicate-button'
world
.
css_click
(
duplicate_btn_css
,
int
(
index
))
...
...
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