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
751994b9
Commit
751994b9
authored
Oct 16, 2013
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pep8 and pylint fixes
parent
37933cb5
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
12 deletions
+14
-12
cms/djangoapps/contentstore/features/common.py
+1
-0
cms/djangoapps/contentstore/features/course-team.py
+4
-4
cms/djangoapps/contentstore/features/course_import.py
+1
-0
cms/djangoapps/contentstore/features/grading.py
+1
-1
cms/djangoapps/contentstore/features/textbooks.py
+3
-3
cms/djangoapps/contentstore/features/upload.py
+1
-1
common/djangoapps/terrain/steps.py
+3
-3
No files found.
cms/djangoapps/contentstore/features/common.py
View file @
751994b9
...
...
@@ -223,6 +223,7 @@ def i_enabled_the_advanced_module(step, module):
type_in_codemirror
(
0
,
'["
%
s"]'
%
module
)
press_the_notification_button
(
step
,
'Save'
)
@world.absorb
def
add_unit
():
world
.
clear_courses
()
...
...
cms/djangoapps/contentstore/features/course-team.py
View file @
751994b9
...
...
@@ -50,8 +50,8 @@ def other_delete_self(_step):
@step
(
u'I make "([^"]*)" a course team admin'
)
def
make_course_team_admin
(
_step
,
name
):
admin_btn_css
=
'.user-item[data-email="{
email}
"] .user-actions .add-admin-role'
.
format
(
email
=
name
+
'@edx.org'
)
admin_btn_css
=
'.user-item[data-email="{
name}@edx.org
"] .user-actions .add-admin-role'
.
format
(
name
=
name
)
world
.
css_click
(
admin_btn_css
)
...
...
@@ -80,8 +80,8 @@ def see_course(_step, do_not_see, gender='self'):
@step
(
u'"([^"]*)" should( not)? be marked as an admin'
)
def
marked_as_admin
(
_step
,
name
,
not_marked_admin
):
flag_css
=
'.user-item[data-email="{
email}
"] .flag-role.flag-role-admin'
.
format
(
email
=
name
+
'@edx.org'
)
flag_css
=
'.user-item[data-email="{
name}@edx.org
"] .flag-role.flag-role-admin'
.
format
(
name
=
name
)
if
not_marked_admin
:
assert
world
.
is_css_not_present
(
flag_css
)
else
:
...
...
cms/djangoapps/contentstore/features/course_import.py
View file @
751994b9
...
...
@@ -2,6 +2,7 @@ import os
from
lettuce
import
world
from
django.conf
import
settings
def
import_file
(
filename
):
world
.
browser
.
execute_script
(
"$('input.file-input').css('display', 'block')"
)
path
=
os
.
path
.
join
(
settings
.
COMMON_TEST_DATA_ROOT
,
"imports"
,
filename
)
...
...
cms/djangoapps/contentstore/features/grading.py
View file @
751994b9
...
...
@@ -180,7 +180,7 @@ def cannot_edit_fail(_step):
def
i_change_grace_period
(
_step
,
grace_period
):
grace_period_css
=
'#course-grading-graceperiod'
ele
=
world
.
css_find
(
grace_period_css
)
.
first
# Sometimes it takes a moment for the JavaScript
# to populate the field. If we don't wait for
# this to happen, then we can end up with
...
...
cms/djangoapps/contentstore/features/textbooks.py
View file @
751994b9
...
...
@@ -47,7 +47,7 @@ def name_textbook(_step, name):
@step
(
u'I name the (first|second|third) chapter "([^"]*)"'
)
def
name_chapter
(
_step
,
ordinal
,
name
):
index
=
[
"first"
,
"second"
,
"third"
]
.
index
(
ordinal
)
input_css
=
".textbook .chapter{i} input.chapter-name"
.
format
(
i
=
index
+
1
)
input_css
=
".textbook .chapter{i} input.chapter-name"
.
format
(
i
=
index
+
1
)
world
.
css_fill
(
input_css
,
name
)
if
world
.
is_firefox
():
world
.
trigger_event
(
input_css
)
...
...
@@ -56,7 +56,7 @@ def name_chapter(_step, ordinal, name):
@step
(
u'I type in "([^"]*)" for the (first|second|third) chapter asset'
)
def
asset_chapter
(
_step
,
name
,
ordinal
):
index
=
[
"first"
,
"second"
,
"third"
]
.
index
(
ordinal
)
input_css
=
".textbook .chapter{i} input.chapter-asset-path"
.
format
(
i
=
index
+
1
)
input_css
=
".textbook .chapter{i} input.chapter-asset-path"
.
format
(
i
=
index
+
1
)
world
.
css_fill
(
input_css
,
name
)
if
world
.
is_firefox
():
world
.
trigger_event
(
input_css
)
...
...
@@ -65,7 +65,7 @@ def asset_chapter(_step, name, ordinal):
@step
(
u'I click the Upload Asset link for the (first|second|third) chapter'
)
def
click_upload_asset
(
_step
,
ordinal
):
index
=
[
"first"
,
"second"
,
"third"
]
.
index
(
ordinal
)
button_css
=
".textbook .chapter{i} .action-upload"
.
format
(
i
=
index
+
1
)
button_css
=
".textbook .chapter{i} .action-upload"
.
format
(
i
=
index
+
1
)
world
.
css_click
(
button_css
)
...
...
cms/djangoapps/contentstore/features/upload.py
View file @
751994b9
...
...
@@ -191,7 +191,7 @@ def view_asset(_step, status):
# Note that world.visit would trigger a 403 error instead of displaying "Unauthorized"
# Instead, we can drop back into the selenium driver get command.
world
.
browser
.
driver
.
get
(
url
)
assert_equal
(
world
.
css_text
(
'body'
),
expected_text
)
assert_equal
(
world
.
css_text
(
'body'
),
expected_text
)
@step
(
'I see a confirmation that the file was deleted$'
)
...
...
common/djangoapps/terrain/steps.py
View file @
751994b9
...
...
@@ -22,7 +22,7 @@ logger = getLogger(__name__)
@step
(
r'I wait (?:for )?"(\d+\.?\d*)" seconds?$'
)
def
wait
(
step
,
seconds
):
def
wait
_for_seconds
(
step
,
seconds
):
world
.
wait
(
seconds
)
...
...
@@ -145,9 +145,9 @@ def should_see_in_the_page(step, doesnt_appear, text):
else
:
multiplier
=
1
if
doesnt_appear
:
assert
world
.
browser
.
is_text_not_present
(
text
,
wait_time
=
5
*
multiplier
)
assert
world
.
browser
.
is_text_not_present
(
text
,
wait_time
=
5
*
multiplier
)
else
:
assert
world
.
browser
.
is_text_present
(
text
,
wait_time
=
5
*
multiplier
)
assert
world
.
browser
.
is_text_present
(
text
,
wait_time
=
5
*
multiplier
)
@step
(
'I am logged in$'
)
...
...
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