Fix failing tests: savings tab rename + frequency utility#32
Merged
kryptodrex merged 4 commits intoissue-fixesfrom Mar 12, 2026
Merged
Fix failing tests: savings tab rename + frequency utility#32kryptodrex merged 4 commits intoissue-fixesfrom
kryptodrex merged 4 commits intoissue-fixesfrom
Conversation
Co-authored-by: kryptodrex <[email protected]>
…ility Co-authored-by: kryptodrex <[email protected]>
|
❌ Version File Not Updated The version file was not modified in this PR. Please update the |
Copilot
AI
changed the title
[WIP] Fix the test case issue and improve reliability
Fix failing tests: savings tab rename + frequency utility
Mar 12, 2026
Signed-off-by: Joseph <[email protected]>
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.
Three CI tests were failing on
issue-fixesdue to an unupdated test after an intentional tab rename and a behavioral regression introduced during a refactor of bill frequency logic.Summary
tabManagement.ts: Renamedbenefitstab →savings(order: 3), shiftedloansto order 4. AddednormalizeLegacyTabId()for backward-compat migration of persisted configs. RefactoredinitializeTabConfigsto sync canonical labels/icons from defaults while preserving user visibility/order state.frequency.ts(new): Centralized frequency normalization and occurrences-per-year lookups for pay, bill, and savings frequencies. Handles aliases (biweekly,semiannual,annually, etc.) and input normalization (case, spacing, dash variants).billFrequency.ts: Refactored to usegetBillFrequencyOccurrencesPerYear.customfrequency explicitly returnsamount * 12— preserving original monthly semantics independent of the generic frequency utility's fallback of1.payPeriod.ts:getPaychecksPerYearnow delegates togetPayFrequencyOccurrencesPerYear.auth.ts: AddedCoreFrequency,SavingsFrequencytypes;PayFrequencyandBillFrequencynow derived fromCoreFrequency.tabManagement.test.ts: Updated expected tab order to reflectsavings/loanspositions.frequency.test.ts(new): 4 tests covering normalization, pay/bill/savings frequency lookups including aliases.Result: 46 tests passing across 12 test files.
Type of Change
User-Facing Impact
Features.mdDocs Checklist
README.mdand updated it for major functionality/architecture changes (if applicable)app_updates/APP_UPDATES.mdfor shipped/planned status changes (if applicable)Validation
npm run lintnpx tsc --noEmitNotes
normalizeLegacyTabIdmaps oldbenefitsIDs →savingsso existing persisted tab configs migrate cleanly on load.getBillFrequencyOccurrencesPerYear('custom')intentionally returns1(no period given = unknown cadence);convertBillToYearlyshort-circuits before calling it so bill calculation semantics are unchanged.📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.