Repository navigation
Conversation
Seatbelt-Operation: 0e9ad28d-53d1-4aa9-baac-7c8c97723582
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Seatbelt-Operation: 9c3ccfa2-8f76-4f56-9b19-48906f453380
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
Remove unsafe type assertions from chart filters, address defaults, country localization, and invoice company-size forwarding. Preserve exact-merchant filters, inclusive date bounds, registered address-field retention and validation, localization fallbacks, and current and legacy company-size values.
Changed files:
src/components/AddressForm.tsxsrc/components/CountrySelector.tsxsrc/components/Search/SearchChartView.tsxsrc/components/Search/chartGroupByConfig.tssrc/languages/IntlStore.tssrc/libs/CountryUtils.tssrc/libs/Localize/index.tssrc/libs/actions/IOU/PayMoneyRequest.tssrc/pages/AddressPage.tsxsrc/pages/settings/Profile/PersonalDetails/PersonalAddressPage.tsxsrc/types/onyx/IntroSelected.tstests/actions/IOUTest/PayMoneyRequestTest.tstests/ui/AddressPageTest.tsxtests/ui/WorkspaceTravelAddressCountryTest.tsxtests/unit/CountryUtils.test.tstests/unit/Search/chartGroupByConfigTest.tsFixed Issues
$ #94739
PROPOSAL: #94739 (comment)
Tests
Manual QA required. QA before review.
Use the candidate App against its supported test backend, signed in with a non-delegate account. Run each case on Android native, Android mWeb Chrome, iOS native, iOS mWeb Safari, macOS Chrome, and macOS Safari; use the repository's Mobile-Expensify setup for native builds. Create data through the normal App UI and check for unexpected JavaScript console errors throughout.
Personal address validation and retained fields
Setup: Open the signed-in App link
/settings/profile/address. Using this form, save 123 Main St, Suite 4, New York, United States, state New York (NY), ZIP 10001./settings/profile/address. Both street lines, New York city/state, United States and 10001 appear./settings/profile/address. Canada, Ontario, New York, M5V 2T6 and both original street lines appear./settings/profile/address. United States, New York state/city, 10001 and both street lines remain.Country label follows the language
Setup: Retain the US address saved in the preceding case. Use Settings > Preferences > Language and the signed-in App link
/settings/profile/address./settings/profile/address. Country reads United States./settings/profile/address. Country reads Estados Unidos de América and address labels are Spanish./settings/profile/address. Country reads United States again with the same saved address.Chart setup: create ordinary cash expenses through Create expense > Manual with different amounts: merchant
Ion 2023-12-31, merchantI shopon 2024-01-06, and merchantI shopon 2024-01-07. Open Expenses/Search with a date range containing all three and a supported additional filter that includes them. Restore this original result before each Bar, Pie, or Line variation because drill-down removes the grouping and chart view.Merchant bar selects the exact merchant
Setup: Restore the original Expenses/Search result described above before configuring this chart.
Merchant pie selects the exact merchant
Setup: Restore the original Expenses/Search result described above before configuring this chart.
Week line uses inclusive date bounds
Setup: Restore the original Expenses/Search result described above before configuring this chart.
Insights comparison keeps the current-period identity
Setup: Use an account with Insights and comparison access and ordinary expenses visible in Insights > Spend. Through Create expense > Manual, create expenses with different amounts on Jan 5 and Jan 6, 2024, plus an expense on Jan 3 in the preceding period. Open the headline Spend over time chart with a supported workspace/currency filter that includes them; use Day grouping for the two-day current range.
Focused lint, formatting, and nine Jest suites (211 tests) passed. CI passed typecheck, lint, formatting, React Compiler checks, and the selected Jest suites.
The checked-in tests cover chart dispatch and comparison-series data, country/localization fallbacks, registered address values including the Travel consumer, and invoice company-size forwarding. To repeat the selected suites with the normal repository test command:
npm test -- --runInBand --runTestsByPath \ tests/unit/Search/chartGroupByConfigTest.ts \ tests/unit/buildChartSeriesTest.ts \ tests/unit/buildInsightsChartCSVTest.ts \ tests/unit/getInProgressBucketLabelTest.ts \ tests/unit/CountryUtils.test.ts \ tests/ui/AddressPageTest.tsx \ tests/ui/WorkspaceTravelAddressCountryTest.tsx \ tests/actions/IOUTest/PayMoneyRequestTest.ts \ tests/unit/OnboardingFlowTest.tsOffline tests
N/A. Address writes, synchronization, recovery, chart fetching, and the existing localization cache behavior are unchanged, so this refactor introduces no distinct offline case.
QA Steps
Same as Tests, on staging only after the candidate is deployed there and equivalent account, data, and Insights comparison access are available.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Screenshots/Videos
No manual execution evidence or recordings were supplied; all selected cases and required platform lanes remain unverified by human execution. The required Insights current-point navigation check lacks a supported account/access method with comparison enabled and ordinary Spend data on the candidate test backend. Automated form tests use reduced navigation and mocked transport, and chart unit tests do not establish rendered gestures or navigation. Offline testing is N/A and is not claimed as performed.