diff --git a/lms/djangoapps/courseware/features/certificates.feature b/lms/djangoapps/courseware/features/certificates.feature index 1b385b32e5..279ef019d6 100644 --- a/lms/djangoapps/courseware/features/certificates.feature +++ b/lms/djangoapps/courseware/features/certificates.feature @@ -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 diff --git a/lms/djangoapps/courseware/features/certificates.py b/lms/djangoapps/courseware/features/certificates.py index b8a5b958b6..39c23e5cf8 100644 --- a/lms/djangoapps/courseware/features/certificates.py +++ b/lms/djangoapps/courseware/features/certificates.py @@ -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' diff --git a/lms/templates/dashboard/dashboard_course_listing.html b/lms/templates/dashboard/dashboard_course_listing.html index 2f9069034a..fb78980da3 100644 --- a/lms/templates/dashboard/dashboard_course_listing.html +++ b/lms/templates/dashboard/dashboard_course_listing.html @@ -125,7 +125,7 @@ %if enrollment.mode != 'verified' and 'verified' in course_modes: -
+
${_("Get a verified certificate for this course!")} %if course_modes['verified'].expiration_date: <% days_left = (course_modes['verified'].expiration_date - date.today()).days %>