Skip to content

test: cover frontend controls and document local sandbox - #1674

Merged
blurbeast merged 1 commit into
LabsCrypt:mainfrom
ada-nwali:test/1664-1667-component-tests-sandbox-guide
Oct 18, 2026
Merged

blurbeast merged 1 commit into
LabsCrypt:mainfrom
ada-nwali:test/1664-1667-component-tests-sandbox-guide

Conversation

@ada-nwali

Copy link
Copy Markdown

Description

Adds unit coverage for wallet disconnection confirmation, Stellar network selection, and theme switching, and documents how to start and seed FlowFi's local mock sandbox.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔧 Refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test addition or update

Related Issues

Closes #1664
Closes #1665
Closes #1666
Closes #1667

Changes Made

  • Added DisconnectConfirmModal tests for confirm, cancel, and Escape behavior.
  • Added NetworkSelector tests for active network labels/badge colors, selection, and keyboard accessibility.
  • Added ModeToggle tests for theme labels, theme changes, keyboard activation, and persisted preference.
  • Added a quickstart guide for starting the local sandbox, enabling its backend mode, and running the mock data seed script.

Testing

  • npm run test --workspace=frontend -- src/components/wallet/DisconnectConfirmModal.test.tsx src/components/NetworkSelector.test.tsx src/components/ModeToggle.test.tsx — passed (9 tests).
  • npm run lint --workspace=frontend -- src/components/wallet/DisconnectConfirmModal.test.tsx src/components/NetworkSelector.test.tsx src/components/ModeToggle.test.tsx — passed.
  • npx tsc --noEmit -p frontend/tsconfig.json — passed.
  • npm run build --prefix docs-site — passed; reports the existing Docusaurus deprecated-option warning.

Test Coverage

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Test Steps

  1. Run the focused frontend test command listed above.
  2. From the repository root, run npm run dev:mock to start the local mock environment and seed its demo data.
  3. Open the frontend and select Sandbox in the network selector to use the local mock RPC.

Breaking Changes

Breaking Changes:

  • None.

Migration Guide:

Not applicable.

Screenshots/Demo

Not applicable.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Updated Postman/Hoppscotch API collections if routes changed
  • If routes or response shapes changed, ran the OpenAPI api-types drift check (npm run codegen:openapi in backend/, then npm run codegen:api-types in frontend/) and committed the regenerated flowfi.openapi.json / api-types.generated.ts
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have checked for breaking changes and documented them if applicable
  • If this change adds or modifies a metric, I have updated the Grafana dashboard and the alert rules in backend/docs/observability/

Additional Notes

There is already an open upstream PR (#1673) with overlapping quickstart documentation for #1664. This PR includes the requested documentation alongside the three component test suites so the four issues can be reviewed together; please coordinate if the existing docs PR merges first.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Epic-Drytu Epic-Drytu mentioned this pull request Oct 18, 2026
4 tasks done
@blurbeast
blurbeast merged commit 9d93064 into LabsCrypt:main Oct 18, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment