Closed jbpenrath closed 2 months ago
@jbpenrath
I didn't succeed to reproduce and didn't understand who this tag could be displayed without an existing enrollment for the current user.
The tag is displayed in CourseRunItemWithEnrollment when useCourseEnrollment
return enrollmentIsActive === true
useCourseEnrollment will fetch an existing enrollment and if one is found, it will then fetch if its active.
The only way to have enrollmentIsActive === true
is to have an active enrollment in Joanie attached to the resource link of the courseRun.
Bug Report
Problematic Behavior
On a course syllabus, a course run representing a Joanie product the user has not purchased is suffixed by the badge "Enrolled"
Expected behavior/code
If the user has not purchased the related product, the badge should not be displayed. Further tests should be done to check if all is working well with simple course run, product purchased, etc...
Steps to Reproduce