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
db6fa9a3
Commit
db6fa9a3
authored
Feb 19, 2013
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pep8fix lettuce test code
parent
040f840c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
cms/djangoapps/contentstore/features/common.py
+1
-0
lms/djangoapps/courseware/features/courses.py
+3
-2
lms/djangoapps/courseware/features/login.py
+1
-0
lms/djangoapps/courseware/features/registration.py
+3
-0
No files found.
cms/djangoapps/contentstore/features/common.py
View file @
db6fa9a3
...
...
@@ -146,6 +146,7 @@ def add_section(name='My Section'):
span_css
=
'span.section-name-span'
assert_true
(
world
.
browser
.
is_element_present_by_css
(
span_css
,
5
))
def
add_subsection
(
name
=
'Subsection One'
):
css
=
'a.new-subsection-item'
css_click
(
css
)
...
...
lms/djangoapps/courseware/features/courses.py
View file @
db6fa9a3
...
...
@@ -8,6 +8,7 @@ from logging import getLogger
logger
=
getLogger
(
__name__
)
## support functions
def
get_courses
():
'''
Returns dict of lists of courses available, keyed by course.org (ie university).
...
...
@@ -81,8 +82,8 @@ def get_courseware_with_tabs(course_id):
course
=
get_course_by_id
(
course_id
)
chapters
=
[
chapter
for
chapter
in
course
.
get_children
()
if
chapter
.
metadata
.
get
(
'hide_from_toc'
,
'false'
)
.
lower
()
!=
'true'
]
courseware
=
[{
'chapter_name'
:
c
.
display_name
,
'sections'
:
[{
'section_name'
:
s
.
display_name
,
'clickable_tab_count'
:
len
(
s
.
get_children
())
if
(
type
(
s
)
==
seq_module
.
SequenceDescriptor
)
else
0
,
'sections'
:
[{
'section_name'
:
s
.
display_name
,
'clickable_tab_count'
:
len
(
s
.
get_children
())
if
(
type
(
s
)
==
seq_module
.
SequenceDescriptor
)
else
0
,
'tabs'
:
[{
'children_count'
:
len
(
t
.
get_children
())
if
(
type
(
t
)
==
vertical_module
.
VerticalDescriptor
)
else
0
,
'class'
:
t
.
__class__
.
__name__
}
for
t
in
s
.
get_children
()]}
...
...
lms/djangoapps/courseware/features/login.py
View file @
db6fa9a3
...
...
@@ -33,6 +33,7 @@ def click_the_dropdown(step):
e
.
click
()
#### helper functions
def
user_is_an_unactivated_user
(
uname
):
u
=
User
.
objects
.
get
(
username
=
uname
)
u
.
is_active
=
False
...
...
lms/djangoapps/courseware/features/registration.py
View file @
db6fa9a3
from
lettuce
import
world
,
step
@step
(
'I register for the course numbered "([^"]*)"$'
)
def
i_register_for_the_course
(
step
,
course
):
courses_section
=
world
.
browser
.
find_by_css
(
'section.courses'
)
...
...
@@ -13,11 +14,13 @@ def i_register_for_the_course(step, course):
assert
world
.
browser
.
is_element_present_by_css
(
'section.container.dashboard'
)
@step
(
u'I should see the course numbered "([^"]*)" in my dashboard$'
)
def
i_should_see_that_course_in_my_dashboard
(
step
,
course
):
course_link_css
=
'section.my-courses a[href*="
%
s"]'
%
course
assert
world
.
browser
.
is_element_present_by_css
(
course_link_css
)
@step
(
u'I press the "([^"]*)" button in the Unenroll dialog'
)
def
i_press_the_button_in_the_unenroll_dialog
(
step
,
value
):
button_css
=
'section#unenroll-modal input[value="
%
s"]'
%
value
...
...
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