-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: integrate redemption into learner credit audit upgrade modal #1118
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1118 +/- ##
==========================================
+ Coverage 86.90% 87.01% +0.10%
==========================================
Files 388 388
Lines 8035 8064 +29
Branches 1967 1939 -28
==========================================
+ Hits 6983 7017 +34
+ Misses 1003 998 -5
Partials 49 49 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just 1 additional nit and a question
return { | ||
...defaultReturn, | ||
subsidyForCourse: applicableSubsidy, | ||
redeem: async (e) => { | ||
e?.preventDefault(); | ||
await sendEnterpriseTrackEventWithDelay( | ||
enterpriseCustomer.uuid, | ||
'edx.ui.enterprise.learner_portal.course.upgrade_button.subscription_license.clicked', | ||
); | ||
global.location.assign(applicableSubsidy.redemptionUrl); | ||
}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[curious] Was this return not supposed to set hasUpgradeAndConfirm
to true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, audit -> verified upgrade with a subscription license does not use a distinct "Upgrade" CTA or have a confirmation modal so hasUpgradeAndConfirm: false
from the defaultReturn
is returned here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[addtl context] In the subscription license upgrade case, both the course title hyperlink and the "Start course" / "Resume" button CTA links through the Data Sharing Consent flow , without an explicit upgrade confirmation.
Description
Integrates the
EnrollModal
(enrollment/upgrade confirmation modal used on Dashboard and Course page routes) with the Learner Credit redemption API, such that the audit enrollment is upgraded to verified and the learner is redirected to courseware.The behavior of
EnrollModal
for non-Learner Credit eligible upgrades (i.e., coupon code, enterprise offer) is functionally unchanged.Demo
Successful Learner Credit redemption for audit -> verified upgrade
LC_audit_verified_upgrade_success.mov
For all changes
Only if submitting a visual change