Skip to content

feat:E2E tests, ESLint, Horizon reliability, payment confirmation#349

Open
MethelyDev wants to merge 5 commits into
Emmy123222:mainfrom
MethelyDev:main
Open

feat:E2E tests, ESLint, Horizon reliability, payment confirmation#349
MethelyDev wants to merge 5 commits into
Emmy123222:mainfrom
MethelyDev:main

Conversation

@MethelyDev
Copy link
Copy Markdown

PR: Multi-issue improvements — E2E tests, ESLint, Horizon reliability, payment confirmation

Summary


Changes

frontend/e2e/wallet-connect.spec.ts (new file) — closes #223

Added a dedicated Playwright spec that covers the three acceptance criteria:

  1. No extension — unauthenticated dashboard shows "Connect your wallet to get started" and the "Connect Freighter Wallet" button; same check on /transactions.
  2. After mock connect — clicking the button with the fixture-injected Freighter stub results in the wallet address label and XLM balance being visible on the dashboard.
  3. Transactions page post-connect — navigating to /transactions after connecting renders the transaction list view (not the wallet-gate screen).

Uses the existing fixtures.ts for the authenticated scenarios (mocked Freighter, Horizon, and backend auth endpoints).


frontend/.eslintrc.jsoncloses #228

Added the no-console rule at warn level, allowing console.warn and console.error to pass through:

"no-console": ["warn", { "allow": ["warn", "error"] }]

This surfaces direct console.log calls during next lint / CI so developers are reminded to use the project's logging abstraction, without breaking any existing console.warn / console.error calls.


backend/src/services/stellarService.jscloses #235

Introduced a withTimeoutAndRetry(fn, timeoutMs) helper that:

  • Races each Horizon call against a 10-second AbortController timer.
  • Retries up to 3 times on transient errors (5xx, ECONNRESET, ETIMEDOUT, AbortError) using exponential back-off (100 ms × 2ⁿ).
  • Does not retry 404 responses (account not found is definitive).

Applied to all three Horizon call sites:

  • server.loadAccount(publicKey) inside getAccount
  • query.call() inside getPayments
  • op.transaction() (memo fetch) inside getPayments

frontend/components/SendPaymentForm.tsxcloses #238

Updated SendConfirmationModal to fully satisfy the acceptance criteria:

  • Destination now shows both the shortened form (GABCD…WXYZ) and the full address in monospace below it — users can spot accidental paste errors at a glance.
  • Renamed the primary CTA from Confirm & SendConfirm & Sign to match the acceptance criteria and reflect that Freighter signing occurs on confirmation.
  • Added role="dialog", aria-modal="true", and aria-labelledby for accessibility.

Test plan

  • Run npm run test:e2e in frontend/wallet-connect.spec.ts passes in Chromium.
  • Run npm run lint in frontend/no-console warnings appear for any console.log calls.
  • Restart the backend and send a payment with a slow/unreachable Horizon URL — the server returns a timeout error after ~10 s instead of hanging indefinitely.
  • On the dashboard, fill in a destination and amount, click Send — the confirmation modal shows shortened + full address, fee, optional memo, and a Confirm & Sign button. Clicking Cancel returns to the form.

Covers three acceptance criteria from issue Emmy123222#223:
- unauthenticated dashboard/transactions show the Connect wallet prompt
- after Freighter mock-connect, address label and XLM balance are visible
- navigating to /transactions post-connect shows the transaction list, not the gate

Reuses the shared fixtures.ts freighter + backend mock for the authenticated scenarios.
Warns developers when console.log (or any other console method except
console.warn and console.error) is used directly in the frontend.
This nudges them toward the project's proper logging abstraction without
breaking existing console.warn/error calls.
Emmy123222#235)

All Horizon calls (loadAccount, payments query, transaction memo fetch)
are now wrapped in withTimeoutAndRetry which:
- races each call against a 10 s AbortController timer
- retries up to 3 times on transient errors (5xx, network resets, timeouts)
  using exponential back-off (100 ms × 2^attempt)
- does NOT retry 404 responses, which are definitive

This prevents Node.js from queueing requests indefinitely when the Horizon
server is slow or briefly unavailable.
…Emmy123222#238)

The SendConfirmationModal already existed but did not fully satisfy
the acceptance criteria. Updates:
- Destination now shows both the shortened form (8-char prefix/suffix)
  and the full address below it in monospace, so the user can spot
  paste-errors at a glance
- Renamed the primary CTA from 'Confirm & Send' to 'Confirm & Sign'
  to match the acceptance criteria and reflect that Freighter signing
  happens on confirm
- Added role="dialog" + aria-modal + aria-labelledby for accessibility
Summarises all four issues addressed in this branch:
Emmy123222#223 (E2E wallet connect tests), Emmy123222#228 (ESLint no-console),
Emmy123222#235 (Horizon timeout + retry), Emmy123222#238 (confirmation modal).
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@Samuel1505 is attempting to deploy a commit to the Emmanuel's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@MethelyDev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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

Labels

None yet

Projects

None yet

2 participants