No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega!514
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-339-frontend-ux-unit-tests"
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?
Summary
Adds consolidated Vitest regression coverage for gap-analysis #331 visual children (#339):
ArenaSimplePage(#334/#335/#337),TimeArenaPage+ visual hooks (arenaVisualUxHooks.test.ts).INV-FRONTEND-339-UX-UNIT-TESTSinvariant + play-surface row infrontend-content-audit.md.Extracted
hasWywaSummaryActivityhelper so WYWA activity detection is unit-testable without duplicating hook logic.Acceptance checklist
*test.ts(x)files tagged #334–#338cd frontend && npm run typecheck && npm run lint && npm testcd frontend && npm run typecheck && npm run lint && npm testexpect(...)on render/copy/DOM/testidsChild issue → test file(s)
arenaProgression.test.ts,ArenaTimerPodiumCarousel.test.tsx,ArenaSimplePodiumSection.test.tsx,ArenaSimplePage.test.tsxarenaLevelUpCelebration.test.ts,LevelUpCelebrationPopover.test.tsx,arenaVisualUxHooks.test.ts,ArenaSimplePage.test.tsxWalletProfileModalSections.test.tsx(+ empty-history sad path)arenaBuyEffectToastLines.test.ts,ArenaEffectToastStack.test.tsx,mobileBuyEffectToastLayout.test.ts,arenaVisualUxHooks.test.tsWhileYouWereAwayModal.test.tsx,whileYouWereAwayActivity.test.ts,arenaSessionClose.test.ts,TimeArenaPage.test.tsx,indexerApi.test.tsVerification for third parties
git fetch && git checkout issue-339-frontend-ux-unit-testscd frontend && npm run typecheck && npm run lint && npm test— expect 141 files / 743 tests PASS.npx vitest run src/lib/whileYouWereAwayActivity.test.tsnpx vitest run src/components/WhileYouWereAwayModal.test.tsxnpx vitest run src/components/WalletProfileModalSections.test.tsx -t "empty"grep INV-FRONTEND-339 docs/testing/invariants-and-business-logic.mdRelated: #339 (leave open for merge close).
Security review — MR !514
Commit reviewed:
916025477a294aaf3cd285404c2c775c9fb7427dScope: Vitest regression coverage for #331 visual UX (#334–#338); docs/invariant updates (
INV-FRONTEND-339-UX-UNIT-TESTS); production refactor extractinghasWywaSummaryActivityfromuseWhileYouWereAway(behavior-preserving).Method
Production code touched
frontend/src/lib/whileYouWereAwayActivity.tsNumber.isFinite+> 0checks andpodium_epochs_ended.lengthgate as prior inline logicfrontend/src/hooks/useWhileYouWereAway.tsAll other changes are Vitest tests (static markup, sad-path asserts, source-string wiring checks) and documentation.
Findings reviewed (not reported — below medium)
WhileYouWereAwayModalrenders summary fields as React text children; addresses go throughAddressInline/normalizeAddr. Unchanged by this MR; no newdangerouslySetInnerHTMLor HTML sinks introduced.hasWywaSummaryActivitytreats non-finiteNumber()results as inactive; sad-path test confirms modal is skipped. No auth or funds impact.readFileSyncon local sources: Dev/test-only (arenaVisualUxHooks.test.ts, wiring tests); not shipped to browsers.Outcome: FINDINGS: 0 (no medium, high, or critical issues on this diff)
Inline threads: none (no findings to anchor)
Security review: no medium+ findings on this diff.
mentioned in commit
bbf6bbb3f7