-
Notifications
You must be signed in to change notification settings - Fork 307
feat: fixes after package-lock regen #1837
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
base: master
Are you sure you want to change the base?
feat: fixes after package-lock regen #1837
Conversation
|
Thanks for the pull request, @filippovskii09! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
46f8906 to
d6961e9
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1837 +/- ##
==========================================
+ Coverage 91.18% 91.56% +0.38%
==========================================
Files 349 349
Lines 5831 5835 +4
Branches 1376 1382 +6
==========================================
+ Hits 5317 5343 +26
+ Misses 497 473 -24
- Partials 17 19 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b48ac34 to
5acf4e4
Compare
| const actual = jest.requireActual('@openedx/paragon'); | ||
| const PropTypes = jest.requireActual('prop-types'); | ||
|
|
||
| const MockModalDialog = ({ children, isOpen, onClose }) => { |
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.
[important]: Is it possible to abandon the mock of this Paragon component?
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.
this mock resolve third issue about Paragon modal issues in tests in this ticket
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.
Yes, this mock simulates the behavior of a modal window with data-testid="modal-backdrop". However, is it now clear why we’re getting the error TestingLibraryElementError: Unable to find an element by: [data-testid="modal-backdrop"]?
| // Mock Intl.DateTimeFormat to return a consistent timezone across all environments | ||
| // This ensures that the browser_timezone query parameter matches the pact file | ||
| const OriginalDateTimeFormat = Intl.DateTimeFormat; | ||
| jest.spyOn(Intl, 'DateTimeFormat').mockImplementation((...args) => { |
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.
[question]: What exactly caused this change? Why did the tests work without it before?
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.
it was removed
…ning into filippovskii/fix/deps-after-lock-regen
|
|
||
| beforeEach(async () => { | ||
| global.innerWidth = breakpoints.large.minWidth; | ||
| global.innerWidth = breakpoints.large.minWidth ?? 992; |
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.
It would be nice for all breakpoints we use as fallbacks to have constant variables, instead of hardcoded values.
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.
fixed
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.
Oh wait, I just remembered that Paragon already exports a breakpoints object, so let's use that instead new constants
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.
used breakpoints from Paragon
webpack.dev.config.js
Outdated
| }); | ||
|
|
||
| // Fix for sass-loader deprecation warnings | ||
| config.module.rules.forEach((rule) => { |
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.
Can we do without this? I think there is nothing wrong with displaying warnings.
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.
removed
|
|
||
| // delete config.testURL; | ||
|
|
||
| config.reporters = [...(config.reporters || []), ["jest-console-group-reporter", { |
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.
Could you add some context as to why we are removing this?
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.
After regenerating package-lock.json, the dependency updates caused the jest-console-group-reporter to fail with a TypeError: Cannot read properties of undefined (reading 'isSet') during the test run.
Since this is just a reporter utility for grouping console logs and its failure was blocking the test suite execution, I removed it to restore stability to the CI pipeline.
|
Sandbox deployment successful 🚀 |
|
Sandbox deployment failed 💥 |
|
Sandbox deployment successful 🚀 |
|
Sandbox deployment failed 💥 |
|
Sandbox deployment successful 🚀 |
|
Sandbox deployment successful 🚀 |
|
Hi @filippovskii09, thank you for this contribution! Since it seems to include changes to user-facing functionality, it will need product approval before it can be merged. So if this PR doesn't belong to https:/d/github.com/openedx/platform-roadmap/issues/495 (?), please choose your product contribution type and follow the corresponding instructions to get the product review process started. |
Description
This PR solved several issues that arose after deleting the
node_modulesfolder, thepackage-lock.jsonfile and running thenpm installcommand for install dependencies.List of problomes
How to test it
rm -rf node_modules package-lock.jsonnpm installornpm inpm run test,npm run build,npm run types,npm run lint