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

Use UTC time for date strings #1177

Merged
merged 5 commits into from
Jul 29, 2024
Merged

Conversation

stalgiag
Copy link
Contributor

@stalgiag stalgiag commented Jul 25, 2024

Targeting the snapshot-testing branch since there are related changes here but broke this out into a separate PR since that PR has already been reviewed and the changes here will have effects outside of snapshot testing.

While writing snapshot tests, I noticed that dates were inconsistent between my system and CI. Based on @howard-e 's advice, I changed all of the calls to moment to be moment.utc. This fixes the problem.

The only remaining unexpected issue uncovered by the snapshot tests is related to the rollback of the 'Ready to Review', 'Review in Progress', and 'Previously Viewed' statuses after e2e testing. This can be addressed separately.

Copy link
Contributor

@howard-e howard-e left a comment

Choose a reason for hiding this comment

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

Looks good! Happy this was found and at least this is just a display concern. It doesn't seem like it directly affected any database persisted data. I figured there could be an issue with how the app was searching created GH issues with the issuesResolver search but haven't observed any problems there.

Looking back at this and where the project currently is as well, think it may be best to eventually move these date utilities to the shared project and serve it from there. There is already a minor duplication happening here but it will make it easier to switch out if needed.

@@ -25,70 +25,42 @@ async function cleanAndNormalizeSnapshot(page) {
stylesToRemove.forEach(el => el.remove());
});

// Remove elements with Date or status content that might differ between local and CI
// TODO: Investigate why "Ready for Review" and "Review in Progress" status
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for leaving this note

@howard-e howard-e merged commit 65a12a5 into snapshot-testing Jul 29, 2024
2 checks passed
@howard-e howard-e deleted the fix-dates-snapshot-testing branch July 29, 2024 15:10
howard-e added a commit that referenced this pull request Aug 6, 2024
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.

2 participants