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
eff78bfd
Commit
eff78bfd
authored
Jun 03, 2013
by
Peter Fogg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add doc for `click_component_from_menu` and make sure css is present in any case.
parent
ff0c56b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
cms/djangoapps/contentstore/features/component_settings_editor_helpers.py
+8
-1
No files found.
cms/djangoapps/contentstore/features/component_settings_editor_helpers.py
View file @
eff78bfd
...
...
@@ -20,13 +20,20 @@ def click_new_component_button(step, component_button_css):
@world.absorb
def
click_component_from_menu
(
instance_id
,
expected_css
):
"""
Creates a component from `instance_id`. For components with more
than one template, clicks on `elem_css` to create the new
component. Components with only one template are created as soon
as the user clicks the appropriate button, so we assert that the
expected component is present.
"""
elem_css
=
"a[data-location='
%
s']"
%
instance_id
elements
=
world
.
css_find
(
elem_css
)
if
len
(
elements
)
==
1
:
# Multiple templates
world
.
css_click
(
elem_css
)
assert_equal
(
1
,
len
(
world
.
css_find
(
expected_css
)))
else
:
# Single template
assert
(
len
(
filter
(
lambda
ele
:
ele
.
has_class
(
'single_template'
),
elements
))
==
1
)
assert_equal
(
1
,
len
(
world
.
css_find
(
expected_css
)))
@world.absorb
...
...
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