-
Notifications
You must be signed in to change notification settings - Fork 2
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
chore(deps): upgrade @dhis2/cli-app-scripts
and @dhis2/ui
#231
base: master
Are you sure you want to change the base?
Conversation
🚀 Deployed on https://pr-231--dhis2-data-approval.netlify.app |
expect( | ||
getApprovalStatusDisplayData({ | ||
approvalStatus: APPROVAL_STATUSES.ACCEPTED_HERE, | ||
approvedBy: 'Hendrik', | ||
}) | ||
).toEqual({ | ||
displayName: 'Approval by Hendrik accepted 2 years ago', | ||
displayName: `Approval by Hendrik accepted ${yearDiff} years ago`, |
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.
FYI: this test failure, was actually due to the fact that we've progressed one year in time
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.
I am thinking it might be more accurate to mock the underlying current date .. for this scenario, if diffing two dates, one in January 2023, the other in December 2022 .. I assume it would show one month ago
while this custom logic would show 1 year ago
.. more importantly, when it's around the end of the year, then this would show yearDiff + 1
, I think
@dhis2/cli-app-scripts
and @dhis2/ui
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.
LGTM
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.
LGTM .. just the one minor comment
expect( | ||
getApprovalStatusDisplayData({ | ||
approvalStatus: APPROVAL_STATUSES.ACCEPTED_HERE, | ||
approvedBy: 'Hendrik', | ||
}) | ||
).toEqual({ | ||
displayName: 'Approval by Hendrik accepted 2 years ago', | ||
displayName: `Approval by Hendrik accepted ${yearDiff} years ago`, |
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.
I am thinking it might be more accurate to mock the underlying current date .. for this scenario, if diffing two dates, one in January 2023, the other in December 2022 .. I assume it would show one month ago
while this custom logic would show 1 year ago
.. more importantly, when it's around the end of the year, then this would show yearDiff + 1
, I think
This fixes/bypasses some webpack issues I encountered on my new machine....
Edit:
The sentence above was quite s short description, and doesn't explain the changes very well anymore.... Whats happened was a bit of a dependency domino effect:
@dhis2/cli-app-scripts
and@dhis2/ui
, both major version bumps@dhis2/ui
, some Jest and Cypress tests started failingAnother edit:
I changed the PR to reflect what has changed, rather than why I changed it. Should be less confusing that way.