Add acceptance tests.

This commit is contained in:
Diana Huang
2013-10-09 15:00:28 -04:00
parent 115ccf87de
commit 4efe4ecd11
3 changed files with 18 additions and 1 deletions

View File

@@ -70,3 +70,14 @@ Feature: LMS.Verified certificates
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
Scenario: The upsell offer is on the dashboard if I am auditing.
Given I am logged in
When I select the audit track
And I navigate to my dashboard
Then I see the upsell link on my dashboard
Scenario: I can take the upsell offer and be registered for a verified course
Given I am logged in
And I select the audit track
And I navigate to my dashboard

View File

@@ -221,6 +221,12 @@ def see_the_course_on_my_dashboard(step):
assert world.is_css_present(course_link_css)
@step(u'I see the upsell link on my dashboard')
def see_upsell_link_on_my_dashboard(step):
course_link_css = 'div.verified-upsell a[href*="edx/999/Certificates"'
assert world.is_css_present(course_link_css)
@step(u'I see that I am on the verified track')
def see_that_i_am_on_the_verified_track(step):
id_verified_css = 'li.course-item article.course.verified'

View File

@@ -125,7 +125,7 @@
</section>
%if enrollment.mode != 'verified' and 'verified' in course_modes:
<div>
<div class='verified-upsell'>
<a href="${reverse('course_modes_choose', kwargs={'course_id': course.id})}?upgrade=True">${_("Get a verified certificate for this course!")}</a>
%if course_modes['verified'].expiration_date:
<% days_left = (course_modes['verified'].expiration_date - date.today()).days %>