Skip to content

TransactionSecuritySettings has no tests: security setting toggles are uncovered #925

Description

@nanaf6203-bit

TransactionSecuritySettings has no tests: security setting toggles are uncovered

Labels / Complexity: testing · Medium Complexity — Medium

Problem

TransactionSecuritySettings (src/components/security/TransactionSecuritySettings.tsx) lets users configure transaction security settings (the component also has an <img> missing alt at line 341, tracked separately). It has no tests. A regression that fails to persist a toggle or shows the wrong enabled state ships silently in the security settings flow.

Why this is architecturally hard

  1. Toggle persistence is the test design. Tests must pin that each toggle updates the store/service and reflects the saved state on re-render.
  2. It reads the security store. The component renders transactionSecurityStore state; tests need store fixtures for the on/off combinations.

Acceptance criteria

  • Tests cover toggle interactions and persisted state rendering.
  • Tests run in CI via npm test.

Out of scope

The missing alt fix; other security components.

Getting started

  • src/components/security/TransactionSecuritySettings.tsx
  • src/components/__tests__/SecureTransactionConfirmation.test.tsx — the security-component pattern

Commands: npm test.

Good first files to read: src/components/security/TransactionSecuritySettings.tsx.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions