Skip to content

feat(e2e): deterministic E2E seed script#292

Open
forge0x wants to merge 1 commit intomainfrom
feat/e2e-seed
Open

feat(e2e): deterministic E2E seed script#292
forge0x wants to merge 1 commit intomainfrom
feat/e2e-seed

Conversation

@forge0x
Copy link
Contributor

@forge0x forge0x commented Mar 3, 2026

Adds dev/seed/seed-e2e.ts — creates fixed E2E test users directly in MongoDB (idempotent, no Ibex API calls required).

Approach

Bypasses the app layer entirely to avoid Ibex API calls during wallet creation. Writes User, Account, and Wallet documents directly via Mongoose, which is safe for local dev seeding.

Test accounts

Name Phone OTP USD Wallet ID
e2e-alice +15550000001 000000 000000000001-usd
e2e-bob +15550000002 000000 000000000002-usd
e2e-carol +15550000003 000000 000000000003-usd

OTP bypass works on local dev stack and api.test.flashapp.me only.

Usage

yarn run v1.22.22
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Outputs /tmp/e2e-users.json with accountIds + walletIds for Maestro.

Companion to lnflash/flash-mobile#577

Creates 3 fixed E2E test users in MongoDB (idempotent):
  +15550000001 (e2e-alice)  — primary tester
  +15550000002 (e2e-bob)    — secondary user for transfers
  +15550000003 (e2e-carol)  — tertiary user

Each user gets:
  - Deterministic kratosUserId (stable across resets)
  - BTC + USD wallets
  - AccountStatus.Active + AccountLevel.One
  - Location metadata (Kingston, JM)

Outputs /tmp/e2e-users.json with accountIds/walletIds for use by Maestro
OTP bypass code: 000000 (local dev + test env only)

Usage:
  yarn ts-node --project tsconfig.json -r tsconfig-paths/register dev/seed/seed-e2e.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant