-
Notifications
You must be signed in to change notification settings - Fork 32
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: Conditionally render expiring learner credit alerts and modals #1224
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1224 +/- ##
==========================================
+ Coverage 85.37% 85.39% +0.01%
==========================================
Files 537 537
Lines 11672 11684 +12
Branches 2462 2430 -32
==========================================
+ Hits 9965 9977 +12
Misses 1657 1657
Partials 50 50 ☔ 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.
LGTM, with a nit & suggestion.
src/components/BudgetExpiryAlertAndModal/data/hooks/useExpiry.jsx
Outdated
Show resolved
Hide resolved
return { endDate, expected: expiryThresholds[0]({ date: formatDate(endDate.toString()) }) }; | ||
})(), | ||
])('displays correct notification and modal when plan is expiring in %s days', ({ endDate, expected }) => { | ||
{ |
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.
[kudos] Nice clean up on the it.each
syntax :)
@@ -89,6 +89,5 @@ describe('<ContentHighlights>', () => { | |||
data: { results: [{ applies_to_all_contexts: true }] }, | |||
})); | |||
renderWithRouter(<ContentHighlightsWrapper location={{ state: {} }} />); | |||
screen.debug(); |
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.
lol d'oh
Conditionally renders expiration modal and alert if the enterprise customer field
disable_expiry_messaging_for_learner_credit
is toggled.Screen.Recording.2024-05-16.at.12.38.47.PM.mov
Screen.Recording.2024-05-16.at.12.40.07.PM.mov
For all changes
Only if submitting a visual change