Skip to content

[Testing] criticalFlows.spec.ts duplicates the loan-request and repay flows already covered by dedicated specs, with divergent mock shapes that risk drift #1250

Description

@grantfox-oss

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Why this matters

frontend/e2e/criticalFlows.spec.ts Flow 1 (loan wizard) overlaps frontend/e2e/borrower-loan-flow.spec.ts and Flow 3 (repay) overlaps frontend/e2e/borrower-repay-flow.spec.ts, but the two sets mock different route shapes (e.g. criticalFlows mocks **/api/loans/123/repay and a flat loans response while borrower-repay-flow mocks its own shapes). Maintaining two divergent copies of the same flow means a UI/contract change must be fixed twice and the specs can silently disagree about the real API.

Acceptance criteria

  • Consolidate the loan-request and repay coverage into the dedicated specs (borrower-loan-flow.spec.ts, borrower-repay-flow.spec.ts) and remove the duplicated flows from criticalFlows.spec.ts, or extract a shared mock/fixtures module both reuse
  • Ensure the single source uses one consistent set of route mocks
  • Keep any criticalFlows-only coverage (e.g. settings/logout) intact

Files to touch

  • frontend/e2e/criticalFlows.spec.ts
  • frontend/e2e/borrower-loan-flow.spec.ts
  • frontend/e2e/borrower-repay-flow.spec.ts

Out of scope

  • Rewriting the components under test
  • Changing CI runner configuration

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programfrontendIssues related to frontend developmenttestingAdding or fixing tests

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions