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: refresh course data when moving to review to get automated generated slug #888

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

DawoudSheraz
Copy link
Contributor

@DawoudSheraz DawoudSheraz commented Jul 12, 2023

PROD-3460

Description

The learn/subdirectory slug for a course is generated when a course run is moved to legal review. When the action to move a course run to legal review is initiated, two API calls are made. One for Course update and then course run update. It is in 2nd API call where the course slug is updated. This updates the data on the backend but the frontend does not contain updated course information. Refreshing of the page is required to bring in fresh data. This PR adds a change to refreshData when a course run is moved to legal review, only if the new slug format flag is enabled.

There are no unit tests in place for functions like handleCourseRuns or editCourse. Setting their unit tests would require some effort, which is already being discussed internally. That's why I did not add a unit test.

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.05 ⚠️

Comparison is base (b931ce6) 66.89% compared to head (aa10a6c) 66.85%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #888      +/-   ##
==========================================
- Coverage   66.89%   66.85%   -0.05%     
==========================================
  Files         128      128              
  Lines        3187     3189       +2     
  Branches      922      923       +1     
==========================================
  Hits         2132     2132              
- Misses       1007     1008       +1     
- Partials       48       49       +1     
Impacted Files Coverage Δ
src/data/actions/courseInfo.js 50.39% <0.00%> (-0.81%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@AfaqShuaib09 AfaqShuaib09 left a comment

Choose a reason for hiding this comment

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

Tested on local, LGTM.

@DawoudSheraz DawoudSheraz merged commit 80b4a1e into master Jul 13, 2023
3 of 5 checks passed
@DawoudSheraz DawoudSheraz deleted the dsheraz/PROD-3460 branch July 13, 2023 04:24
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