-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix broken unit test that depends on date #45651
Conversation
FWIW, the test will break again on 2042-07-18
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.
haha gonna break in 18 years right, we'll just update it then? We could also do future data equals current date plus 1050 years or something?
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
Yep. Ping me when it breaks in 2042 and I'll come out of retirement to submit a follow-up PR to change the date again |
🚀 Deployed to staging by https://github.com/srikarparsi in version: 9.0.9-1 🚀
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.0.9-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.9-5 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.10-7 🚀
|
Details
ValidationUtils.isValidDate()
checks that a date is not more than 1000 years in the future. The test was written one year ago with a test date of 1001 years in the future (today plus 1000 years), so it just broke now.Fixed Issues
N/A, this test just broke for everyone because of how it was originally written.
Tests
Make sure all tests pass
Offline tests
N/A
QA Steps
No QA
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop