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: upgrade react router to v6 #850

Conversation

Syed-Ali-Abbas-Zaidi
Copy link
Contributor

@Syed-Ali-Abbas-Zaidi Syed-Ali-Abbas-Zaidi commented Mar 20, 2023

Ticket

React Router Upgrade to v6.

Description

This PR upgrades React Router from v5 to v6.

@Syed-Ali-Abbas-Zaidi Syed-Ali-Abbas-Zaidi marked this pull request as draft March 20, 2023 07:30
@codecov
Copy link

codecov bot commented May 15, 2023

Codecov Report

Attention: 24 lines in your changes are missing coverage. Please review.

Comparison is base (b268b96) 66.97% compared to head (3b59a6e) 67.17%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #850      +/-   ##
==========================================
+ Coverage   66.97%   67.17%   +0.19%     
==========================================
  Files         128      128              
  Lines        3201     3211      +10     
  Branches      927      927              
==========================================
+ Hits         2144     2157      +13     
+ Misses       1008     1005       -3     
  Partials       49       49              
Files Coverage Δ
src/components/CreateCoursePage/index.jsx 85.71% <100.00%> (ø)
...components/EditCoursePage/CollapsibleCourseRun.jsx 62.20% <ø> (ø)
src/components/EditCoursePage/EditCourseForm.jsx 80.86% <ø> (ø)
src/components/Header/index.jsx 90.47% <100.00%> (+0.47%) ⬆️
src/containers/CourseDashboard/index.jsx 100.00% <ø> (ø)
src/containers/CreateCollaborator/index.jsx 100.00% <ø> (ø)
src/containers/CreateCourse/index.jsx 100.00% <ø> (ø)
src/containers/CreateCourseRun/index.jsx 100.00% <ø> (ø)
src/containers/CreateStaffer/index.jsx 100.00% <ø> (ø)
src/containers/EditCollaborator/index.jsx 60.00% <ø> (ø)
... and 20 more

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

Copy link
Contributor

@zawan-ila zawan-ila left a comment

Choose a reason for hiding this comment

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

A couple comments. Mostly looks good.

let store;

const createWrapper = (state) => {
store = mockStore(state);
mockOnSubmit = jest.fn();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you remove this mock?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was unnecessary, mockOnSubmit was used to mock the createCourse behavior but there were no assertions being made. CreateCoursePage component was already defining createCourse as an empty function in its default props, so there was no need to mock it.

But if you still suggest bringing this back there are no objections from my side as it will not affect the router upgrade. :)

src/containers/CreateCourse/CreateCourse.test.jsx Outdated Show resolved Hide resolved
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 working fine, will give it a go on stage as well after merge 🤞🏻

@Syed-Ali-Abbas-Zaidi Syed-Ali-Abbas-Zaidi force-pushed the Ali-Abbas/react-router-upgrade branch from 17e84a6 to 3df392a Compare October 11, 2023 07:09
@Syed-Ali-Abbas-Zaidi Syed-Ali-Abbas-Zaidi force-pushed the Ali-Abbas/react-router-upgrade branch from 9444dbe to fb93ee0 Compare November 1, 2023 07:05
@DawoudSheraz DawoudSheraz merged commit df6de26 into openedx:master Nov 6, 2023
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants