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

fix: end date error when certificate row not shown #668

Merged

Conversation

KristinAoki
Copy link
Member

JIRA Ticket: TNL-11164

The Schedule and details page shows a permanent "You've made some changes, but there are some errors". Not sure what the issue is, but the old experience does not have the same issue.

The validator for the Schedule and details page checks if the course end date is after the certificate available date. There is a default certificate available date, but is not shown to users unless the certificate row is displayed. The error message is only shown in the certificate row, so the user is notified of the error in the parent alert but not the details of the error. Now the validator only checks for the compatibility of the end date and certificate available date when the certificate row is displayed.

Testing

  1. Navigate to the Schedule and details page.
  2. Fill out the course end date.
  3. Alert warning at the bottom of the screen should say that changes have been made and allow you to save.
  4. Enable the WaffleSwitch certificates.auto_certificate_generation.
  5. Reload the Schedule and details page.
  6. Certificate available row should be visible.
  7. Fill out the course end date with a date after the certificate available date.
  8. Error should appear in the certificate row.
  9. Alert warning at the bottom of the screen should say that changes have been made with errors and saving is disabled.

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f61f742) 88.02% compared to head (e3bae32) 88.19%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #668      +/-   ##
==========================================
+ Coverage   88.02%   88.19%   +0.16%     
==========================================
  Files         417      417              
  Lines        6598     6598              
  Branches     1428     1428              
==========================================
+ Hits         5808     5819      +11     
+ Misses        765      755      -10     
+ Partials       25       24       -1     
Files Coverage Δ
src/schedule-and-details/hooks.jsx 64.00% <100.00%> (ø)
src/schedule-and-details/index.jsx 91.66% <100.00%> (ø)
src/schedule-and-details/utils.js 89.47% <100.00%> (+28.94%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@kenclary kenclary left a comment

Choose a reason for hiding this comment

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

good tests

@KristinAoki KristinAoki merged commit 02a683f into master Nov 7, 2023
6 checks passed
@KristinAoki KristinAoki deleted the KristinAoki/fix-hidden-certificate-row-end-date-conflict branch November 7, 2023 16:31
Ian2012 pushed a commit to eduNEXT/frontend-app-course-authoring that referenced this pull request Nov 15, 2023
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.

2 participants