test: add Send/Earn coverage with CI enforcement#1220
Open
Ayash-Bera wants to merge 28 commits intojoinmarket-webui:masterfrom
Open
test: add Send/Earn coverage with CI enforcement#1220Ayash-Bera wants to merge 28 commits intojoinmarket-webui:masterfrom
Ayash-Bera wants to merge 28 commits intojoinmarket-webui:masterfrom
Conversation
…lidNumCollaborators
- SendForm: walletFileName instead of name in wallet fixture - helpers: use MAX_NUM_COLLABORATORS + 1 instead of hardcoded 100 - Earn: exact i18n key instead of broad regex for start button
- Use walletFileName instead of name in Earn and Send/index wallet fixtures - Commit TESTING.md ws:// URL fix and threshold note (were in working tree only) - Add isValidAmount(null, true) edge case to complete sweep-mode coverage
CurrentWallet requires displayName; the test fixture was missing it, causing a TypeScript build failure in CI.
…ess, and save error
Author
|
Post-review update: reviewed PR #1222 (a parallel submission for the same project). A few things stood out that informed improvements here:
Coverage is now 46% statements / 39% branches (up from 38% / 28%), with 178 tests across 22 suites. |
Author
|
Follow-up update after the latest test hardening commits: I addressed the remaining core-flow gaps from my previous note and pushed additional behavioral coverage for both Send and Earn lifecycles. What changed since last update
Current status (latest local run)
These updates are intended to fully align with the project objective: deep coverage of Send/Earn/Fee-config critical paths plus enforced CI coverage gates to prevent silent regressions. |
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.
Summary
coverageThresholdtopackage.json(statements 38, branches 28, functions 30, lines 39)npm test -- --coverage --watchAll=falseand fail on threshold breachTESTING.mddocumenting provider wrapping, API mocking, and WebSocket test patternsCoverage Baseline (pre-PR)
Before this PR, the only tests were
App.test.tsxandWallets.test.tsx(2 suites, 17 tests). The seven target files were absent from coverage output entirely — none are imported by those two test files.Running
CI=true npm test -- --coverage --watchAll=falseon the upstream master produced:Files absent from coverage before this PR:
src/components/Send/helpers.tssrc/constants/features.tssrc/components/utxo/utils.tssrc/components/Send/SendForm.tsxsrc/components/Send/index.tsxsrc/components/Earn.tsxsrc/components/settings/FeeConfigModal.tsxCoverage Threshold Justification
Thresholds are set at
floor(measured_after)— the minimum that the new suite reliably meets. This keeps CI honest without inflating numbers: any regression that drops below the measured baseline fails CI, and the bar is not set higher than what the actual tests deliver.Test Plan
CI=true npm test -- --coverage --watchAll=falsepasses all 165 tests