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

chore(deps): upgrade @dhis2/cli-app-scripts and @dhis2/ui #231

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

HendrikThePendric
Copy link
Contributor

@HendrikThePendric HendrikThePendric commented Feb 8, 2023

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:

  1. It started with a webpack issue
  2. This issue could be resolved by upgrading @dhis2/cli-app-scripts and @dhis2/ui, both major version bumps
  3. Due the major version bump in @dhis2/ui, some Jest and Cypress tests started failing
  4. Fixing the Jest tests was pretty straightforward, but fixing the cypress test was more involved because new network fixtures needed to be generated.
  5. To regenerate the fixtures I had to do some capture runs locally, and since I was doing this anyway, I decided it would be a good idea to also adjust the backend versions that were being tested to the latest 3.

Another edit:
I changed the PR to reflect what has changed, rather than why I changed it. Should be less confusing that way.

@HendrikThePendric HendrikThePendric requested a review from a team as a code owner February 8, 2023 14:42
@dhis2-bot
Copy link
Contributor

dhis2-bot commented Feb 8, 2023

🚀 Deployed on https://pr-231--dhis2-data-approval.netlify.app

@HendrikThePendric HendrikThePendric requested a review from a team as a code owner February 8, 2023 18:18
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`,
Copy link
Contributor Author

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

Copy link
Contributor

@kabaros kabaros Feb 9, 2023

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

@HendrikThePendric HendrikThePendric changed the title chore: fix development mode for ARM64 architecture chore(deps): upgrade @dhis2/cli-app-scripts and @dhis2/ui Feb 9, 2023
Copy link
Contributor

@Mohammer5 Mohammer5 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@kabaros kabaros left a 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`,
Copy link
Contributor

@kabaros kabaros Feb 9, 2023

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

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.

4 participants