test(frontend): SwapPage fee-discount registry outage banner visibility (#374) #896
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic!896
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "qa/374-swappage-registry-banner-test"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds the page-level banner-visibility coverage #374 AC5 calls for. The util matrix was already tested in
feeDiscountRegistryWarning.test.ts, but no SwapPage test asserted the banner actually renders — existing SwapPage tests pingetFeeDiscountHealthtook:true, so the amber banner never showed.New file
SwapPage.feeDiscountRegistryBanner.test.tsx(4 cases), isolated so it doesn't changeSwapPage.test.tsxbehavior:fee_discount_registry_ok:false→ banner visible, Swap submit stays enabled (non-blocking).get_registrationLCD query error → banner visible.The fee-discount queries gate on
FEE_DISCOUNT_CONTRACT_ADDRESS, which is empty in the test env, so the file mocks@/utils/constantstruthy (scoped to this file; the existing 13 SwapPage tests are unaffected — verified green).Test-only change.
tsc -bclean. New file 4/4 green;SwapPage.test.tsx13/13 unchanged.Leaves only the browser walkthrough for #374 (laptop).
mentioned in issue #374
Security review
Commit reviewed:
d7dcfe81e75d75e0037a89020b37cfacdcd85aa8Scope: Added file
frontend-dapp/src/pages/SwapPage.feeDiscountRegistryBanner.test.tsxonly (4 Vitest cases for fee-discount registry outage banner visibility on SwapPage). No production/runtime code changes in this diff.Method: Inspected full MR diff; traced exercised paths (
shouldShowFeeDiscountRegistryWarning, staticFEE_DISCOUNT_REGISTRY_WARNING_TEXTrender, indexergetFeeDiscountHealth/ LCDgetRegistrationmocks). Checked for injection, authz, secret leakage, SSRF/XSS, unsafe deserialization, and new dependency surface. No prior security-review threads on this MR.Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
Rationale (summary):
vi.mock/ spies are confined to Vitest; they do not ship in the production bundle or alter runtime constants.dangerouslySetInnerHTML, no attacker-controlled sink).Inline threads: none (no findings to anchor).
mentioned in commit
d013b611abmentioned in commit
17453e7a49mentioned in merge request !899