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
852292eb
Commit
852292eb
authored
Jul 02, 2013
by
Jonah Stanley
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #324 from edx/jonahstanley/fix-component-test
Jonahstanley/fix component test
parents
2fca2d38
47158d70
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
cms/djangoapps/contentstore/features/component.feature
+0
-3
cms/djangoapps/contentstore/features/component.py
+2
-5
No files found.
cms/djangoapps/contentstore/features/component.feature
View file @
852292eb
...
@@ -7,7 +7,6 @@ Feature: Component Adding
...
@@ -7,7 +7,6 @@ Feature: Component Adding
When I add the following components
:
When I add the following components
:
|
Component
|
|
Component
|
|
Discussion
|
|
Discussion
|
|
Announcement
|
|
Blank
HTML
|
|
Blank
HTML
|
|
LaTex
|
|
LaTex
|
|
Blank
Problem
|
|
Blank
Problem
|
...
@@ -26,7 +25,6 @@ Feature: Component Adding
...
@@ -26,7 +25,6 @@ Feature: Component Adding
Then I see the following components
:
Then I see the following components
:
|
Component
|
|
Component
|
|
Discussion
|
|
Discussion
|
|
Announcement
|
|
Blank
HTML
|
|
Blank
HTML
|
|
LaTex
|
|
LaTex
|
|
Blank
Problem
|
|
Blank
Problem
|
...
@@ -50,7 +48,6 @@ Feature: Component Adding
...
@@ -50,7 +48,6 @@ Feature: Component Adding
And I add the following components
:
And I add the following components
:
|
Component
|
|
Component
|
|
Discussion
|
|
Discussion
|
|
Announcement
|
|
Blank
HTML
|
|
Blank
HTML
|
|
LaTex
|
|
LaTex
|
|
Blank
Problem
|
|
Blank
Problem
|
...
...
cms/djangoapps/contentstore/features/component.py
View file @
852292eb
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#pylint: disable=W0621
#pylint: disable=W0621
from
lettuce
import
world
,
step
from
lettuce
import
world
,
step
from
nose.tools
import
assert_true
DATA_LOCATION
=
'i4x://edx/templates'
DATA_LOCATION
=
'i4x://edx/templates'
...
@@ -26,7 +27,7 @@ def add_components(step):
...
@@ -26,7 +27,7 @@ def add_components(step):
def
check_components
(
step
):
def
check_components
(
step
):
for
component
in
[
step_hash
[
'Component'
]
for
step_hash
in
step
.
hashes
]:
for
component
in
[
step_hash
[
'Component'
]
for
step_hash
in
step
.
hashes
]:
assert
component
in
COMPONENT_DICTIONARY
assert
component
in
COMPONENT_DICTIONARY
assert
COMPONENT_DICTIONARY
[
component
][
'found_func'
](
)
assert
_true
(
COMPONENT_DICTIONARY
[
component
][
'found_func'
](),
"{} couldn't be found"
.
format
(
component
)
)
@step
(
u'I delete all components'
)
@step
(
u'I delete all components'
)
...
@@ -61,10 +62,6 @@ COMPONENT_DICTIONARY = {
...
@@ -61,10 +62,6 @@ COMPONENT_DICTIONARY = {
'steps'
:
step_selector_list
(
'discussion'
,
None
),
'steps'
:
step_selector_list
(
'discussion'
,
None
),
'found_func'
:
found_css_func
(
'section.xmodule_DiscussionModule'
)
'found_func'
:
found_css_func
(
'section.xmodule_DiscussionModule'
)
},
},
'Announcement'
:
{
'steps'
:
step_selector_list
(
'html'
,
'Announcement'
),
'found_func'
:
found_text_func
(
'Heading of document'
)
},
'Blank HTML'
:
{
'Blank HTML'
:
{
'steps'
:
step_selector_list
(
'html'
,
'Blank_HTML_Page'
),
'steps'
:
step_selector_list
(
'html'
,
'Blank_HTML_Page'
),
#this one is a blank html so a more refined search is being done
#this one is a blank html so a more refined search is being done
...
...
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