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
473cc362
Commit
473cc362
authored
Aug 23, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed error message on failure and made test more robust
Better error message
parent
9899b1a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
cms/djangoapps/contentstore/features/common.py
+2
-3
cms/djangoapps/contentstore/features/course-settings.py
+6
-3
No files found.
cms/djangoapps/contentstore/features/common.py
View file @
473cc362
...
...
@@ -265,9 +265,8 @@ def type_in_codemirror(index, text):
def
upload_file
(
filename
):
file_css
=
'.upload-dialog input[type=file]'
upload
=
world
.
css_find
(
file_css
)
.
first
path
=
os
.
path
.
join
(
TEST_ROOT
,
filename
)
upload
.
_element
.
send_keys
(
os
.
path
.
abspath
(
path
))
world
.
browser
.
execute_script
(
"$('input.file-input').css('display', 'block')"
)
world
.
browser
.
attach_file
(
'file'
,
os
.
path
.
abspath
(
path
))
button_css
=
'.upload-dialog .action-upload'
world
.
css_click
(
button_css
)
cms/djangoapps/contentstore/features/course-settings.py
View file @
473cc362
...
...
@@ -168,15 +168,18 @@ def i_see_new_course_image(_step):
img
=
images
[
0
]
expected_src
=
'/c4x/MITx/999/asset/image.jpg'
# Don't worry about the domain in the URL
assert
img
[
'src'
]
.
endswith
(
expected_src
)
try
:
assert
img
[
'src'
]
.
endswith
(
expected_src
)
except
AssertionError
as
e
:
e
.
args
+=
(
'Was looking for {}'
.
format
(
expected_src
),
'Found {}'
.
format
(
img
[
'src'
]))
raise
@step
(
'the image URL should be present in the field'
)
def
image_url_present
(
_step
):
field_css
=
'#course-image-url'
field
=
world
.
css_find
(
field_css
)
.
first
expected_value
=
'/c4x/MITx/999/asset/image.jpg'
assert
field
.
value
==
expected_value
assert
world
.
css_value
(
field_css
)
==
expected_value
############### HELPER METHODS ####################
...
...
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