Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
00f96ec7
Commit
00f96ec7
authored
11 years ago
by
David Ormsbee
Browse files
Options
Downloads
Plain Diff
Merge pull request #937 from edx/zoldak/add-cert-tests
Add more certificates test for newly implemented features
parents
af9193af
fbeb63ee
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/djangoapps/courseware/features/certificates.feature
+4
-10
4 additions, 10 deletions
lms/djangoapps/courseware/features/certificates.feature
lms/djangoapps/courseware/features/certificates.py
+43
-24
43 additions, 24 deletions
lms/djangoapps/courseware/features/certificates.py
with
47 additions
and
34 deletions
lms/djangoapps/courseware/features/certificates.feature
+
4
−
10
View file @
00f96ec7
...
...
@@ -28,9 +28,6 @@ Feature: Verified certificates
When
I submit valid payment information
Then
I see that my payment was successful
# Not yet implemented LMS-982
@skip
Scenario
:
Verified courses display correctly on dashboard
Given
I have submitted photos to verify my identity
When
I submit valid payment information
...
...
@@ -57,8 +54,6 @@ Feature: Verified certificates
When
I edit my name
Then
I see the new name on the confirmation page.
# Currently broken LMS-1009
@skip
Scenario
:
I
can return to the verify flow
Given
I have submitted photos to verify my identity
When
I leave the flow and return
...
...
@@ -72,9 +67,8 @@ Feature: Verified certificates
And
I press the payment button
Then
I am at the payment page
# Design not yet finalized
@skip
Scenario
:
I
can take a verified certificate course for free
Given
I have submitted photos to verify my identity
When
I give a reason why I cannot pay
Then
I see that I am registered for a verified certificate course on my dashboard
Given
I am logged in
And
the course has an honor mode
When
I give a reason why I cannot pay
Then
I should see the course on my dashboard
This diff is collapsed.
Click to expand it.
lms/djangoapps/courseware/features/certificates.py
+
43
−
24
View file @
00f96ec7
...
...
@@ -13,6 +13,7 @@ def create_cert_course():
name
=
'
Certificates
'
course_id
=
'
{org}/{number}/{name}
'
.
format
(
org
=
org
,
number
=
number
,
name
=
name
)
world
.
scenario_dict
[
'
course_id
'
]
=
course_id
world
.
scenario_dict
[
'
COURSE
'
]
=
world
.
CourseFactory
.
create
(
org
=
org
,
number
=
number
,
display_name
=
name
)
...
...
@@ -44,6 +45,18 @@ def register():
assert
world
.
is_css_present
(
'
section.wrapper h3.title
'
)
@step
(
u
'
the course has an honor mode
'
)
def
the_course_has_an_honor_mode
(
step
):
create_cert_course
()
honor_mode
=
world
.
CourseModeFactory
.
create
(
course_id
=
world
.
scenario_dict
[
'
course_id
'
],
mode_slug
=
'
honor
'
,
mode_display_name
=
'
honor mode
'
,
min_price
=
0
,
)
assert
isinstance
(
honor_mode
,
CourseMode
)
@step
(
u
'
I select the audit track$
'
)
def
select_the_audit_track
(
step
):
create_cert_course
()
...
...
@@ -171,8 +184,8 @@ def submit_payment(step):
world
.
css_click
(
button_css
)
@step
(
u
'
I have submitted
photos to verify my identity
'
)
def
submitted_
photos_to_verify_my_identity
(
step
):
@step
(
u
'
I have submitted
face and ID photos$
'
)
def
submitted_
face_and_id_photos
(
step
):
step
.
given
(
'
I am logged in
'
)
step
.
given
(
'
I select the verified track
'
)
step
.
given
(
'
I go to step
"
1
"'
)
...
...
@@ -182,6 +195,11 @@ def submitted_photos_to_verify_my_identity(step):
step
.
given
(
'
I capture my
"
photo_id
"
photo
'
)
step
.
given
(
'
I approve my
"
photo_id
"
photo
'
)
step
.
given
(
'
I go to step
"
3
"'
)
@step
(
u
'
I have submitted photos to verify my identity
'
)
def
submitted_photos_to_verify_my_identity
(
step
):
step
.
given
(
'
I have submitted face and ID photos
'
)
step
.
given
(
'
I select a contribution amount
'
)
step
.
given
(
'
I confirm that the details match
'
)
step
.
given
(
'
I go to step
"
4
"'
)
...
...
@@ -207,12 +225,13 @@ def see_the_course_on_my_dashboard(step):
@step
(
u
'
I see that I am on the verified track
'
)
def
see_that_i_am_on_the_verified_track
(
step
):
assert
False
,
'
Implement this step after the design is done
'
id_verified_css
=
'
li.course-item article.course.verified
'
assert
world
.
is_css_present
(
id_verified_css
)
@step
(
u
'
I leave the flow and return$
'
)
def
leave_the_flow_and_return
(
step
):
world
.
browser
.
back
(
)
world
.
visit
(
'
verify_student/verified/edx/999/Certificates
'
)
@step
(
u
'
I am at the verified page$
'
)
...
...
@@ -220,24 +239,24 @@ def see_the_payment_page(step):
assert
world
.
css_find
(
'
button#pay_button
'
)
@step
(
u
'
I press the payment button
'
)
def
press_payment_button
(
step
):
assert
False
,
'
This step must be implemented
'
@step
(
u
'
I have submitted face and ID photos
'
)
def
submitted_face_and_id_photos
(
step
):
assert
False
,
'
This step must be implemented
'
@step
(
u
'
I edit my name
'
)
@step
(
u
'
I edit my name$
'
)
def
edit_my_name
(
step
):
assert
False
,
'
This step must be implemented
'
@step
(
u
'
I see the new name on the confirmation page.
'
)
def
sesee_the_new_name_on_the_confirmation_page
(
step
):
assert
False
,
'
This step must be implemented
'
@step
(
u
'
I have submitted photos
'
)
def
submitted_photos
(
step
):
assert
False
,
'
This step must be implemented
'
@step
(
u
'
I am registered for the course
'
)
def
seam_registered_for_the_course
(
step
):
assert
False
,
'
This step must be implemented
'
@step
(
u
'
I return to the student dashboard
'
)
def
return_to_the_student_dashboard
(
step
):
assert
False
,
'
This step must be implemented
'
btn_css
=
'
a.retake-photos
'
world
.
css_click
(
btn_css
)
@step
(
u
'
I give a reason why I cannot pay$
'
)
def
give_a_reason_why_i_cannot_pay
(
step
):
register
()
link_css
=
'
h5 i.expandable-icon
'
world
.
css_click
(
link_css
)
cb_css
=
'
input#honor-code
'
world
.
css_click
(
cb_css
)
text_css
=
'
li.field-explain textarea
'
world
.
css_find
(
text_css
).
type
(
'
I cannot afford it.
'
)
btn_css
=
'
input[value=
"
Select Certificate
"
]
'
world
.
css_click
(
btn_css
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment