Skip to content
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

Merged
merged 7 commits into from
May 22, 2024

Conversation

brobro10000
Copy link
Contributor

@brobro10000 brobro10000 commented May 16, 2024

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

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)

Only if submitting a visual change

  • Ensure to attach screenshots
  • Ensure to have UX team confirm screenshots

Copy link

codecov bot commented May 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.39%. Comparing base (8dd28c1) to head (ea284c1).

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.
📢 Have feedback on the report? Share it here.

Copy link
Member

@adamstankiewicz adamstankiewicz left a 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.

return { endDate, expected: expiryThresholds[0]({ date: formatDate(endDate.toString()) }) };
})(),
])('displays correct notification and modal when plan is expiring in %s days', ({ endDate, expected }) => {
{
Copy link
Member

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 :)

src/components/BudgetExpiryAlertAndModal/data/utils.js Outdated Show resolved Hide resolved
@@ -89,6 +89,5 @@ describe('<ContentHighlights>', () => {
data: { results: [{ applies_to_all_contexts: true }] },
}));
renderWithRouter(<ContentHighlightsWrapper location={{ state: {} }} />);
screen.debug();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol d'oh

@brobro10000 brobro10000 merged commit 9f442ff into master May 22, 2024
6 checks passed
@brobro10000 brobro10000 deleted the hu/ent-8917 branch May 22, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants