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
b542864b
Commit
b542864b
authored
Sep 12, 2013
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #957 from edx/zoldak/images-in-cert-flow
Fix acceptance tests to capture images for paid cert flow
parents
8194eedc
ade62ab9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
lms/djangoapps/courseware/features/certificates.py
+3
-9
No files found.
lms/djangoapps/courseware/features/certificates.py
View file @
b542864b
...
@@ -113,15 +113,9 @@ def goto_next_step(step, step_num):
...
@@ -113,15 +113,9 @@ def goto_next_step(step, step_num):
@step
(
u'I capture my "([^"]*)" photo$'
)
@step
(
u'I capture my "([^"]*)" photo$'
)
def
capture_my_photo
(
step
,
name
):
def
capture_my_photo
(
step
,
name
):
# Draw a red rectangle in the image element
# Hard coded red dot image
snapshot_script
=
'"{}{}{}{}{}{}"'
.
format
(
image_data
=
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='
"var canvas = $('#{}_canvas');"
.
format
(
name
),
snapshot_script
=
"$('#{}_image')[0].src = '{}';"
.
format
(
name
,
image_data
)
"var ctx = canvas[0].getContext('2d');"
,
"ctx.fillStyle = 'rgb(200,0,0)';"
,
"ctx.fillRect(0, 0, 640, 480);"
,
"var image = $('#{}_image');"
.
format
(
name
),
"image[0].src = canvas[0].toDataURL('image/png').replace('image/png', 'image/octet-stream');"
)
# Mirror the javascript of the photo_verification.html page
# Mirror the javascript of the photo_verification.html page
world
.
browser
.
execute_script
(
snapshot_script
)
world
.
browser
.
execute_script
(
snapshot_script
)
...
...
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