Commit 4efe4ecd by Diana Huang

Add acceptance tests.

parent 115ccf87
...@@ -70,3 +70,14 @@ Feature: LMS.Verified certificates ...@@ -70,3 +70,14 @@ Feature: LMS.Verified certificates
And the course has an honor mode And the course has an honor mode
When I give a reason why I cannot pay When I give a reason why I cannot pay
Then I should see the course on my dashboard 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
...@@ -221,6 +221,12 @@ def see_the_course_on_my_dashboard(step): ...@@ -221,6 +221,12 @@ def see_the_course_on_my_dashboard(step):
assert world.is_css_present(course_link_css) 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') @step(u'I see that I am on the verified track')
def see_that_i_am_on_the_verified_track(step): def see_that_i_am_on_the_verified_track(step):
id_verified_css = 'li.course-item article.course.verified' id_verified_css = 'li.course-item article.course.verified'
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</section> </section>
%if enrollment.mode != 'verified' and 'verified' in course_modes: %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> <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: %if course_modes['verified'].expiration_date:
<% days_left = (course_modes['verified'].expiration_date - date.today()).days %> <% days_left = (course_modes['verified'].expiration_date - date.today()).days %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment