test(e2e): pool-tx must fail (not skip); provision funds for local Playwright wallet #103
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#103
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Pool provide / withdraw E2E tests must fail the build when preconditions are not met (funded dev wallet, LCD up, CTA not blocked) instead of silently skipping with
test.skip, which masks regressions in the pool transaction path.Current baseline (repo)
frontend-dapp/e2e/pool-tx.spec.ts(and similar patterns inwrap-pool.spec.ts, etc.): on Insufficient or Connect submit label, callstest.skip(true, '... fund the dev wallet ...').e2e/helpers/chain.ts—skipIfLcdUnreachableand others skip if LCD is down.e2e/fixtures/dev-wallet.ts— connects Simulated Wallet (fixed address) but does not assert chain balance or pre-fund for pool amounts.Requirements
tax-free faucet script, orterrad tx bank sendinglobalSetup/ fixture before pool tests.docs/testing.mdore2e/README.md.playwright.config.ts(do not break stability when funding in parallel — use per-worker accounts or idempotent funding).Acceptance criteria
pool-tx.spec.tshas notest.skipfor “fund the dev wallet” on the default CI path.pnpm exec playwright test e2e/pool-tx.spec.tsor equivalent) is documented and passes on a fresh localnet when followed.REQUIRE_LOCALTERRA=0) may downgrade — document; default = strict.References
frontend-dapp/e2e/pool-tx.spec.tsfrontend-dapp/e2e/helpers/chain.tsfrontend-dapp/e2e/fixtures/dev-wallet.ts.cursor/rules/playwright-workers.mdc— workers=5Labels suggested
testing,e2e,frontend,infra,launch-blockermentioned in issue #107
mentioned in commit
844607a438mentioned in issue #106
mentioned in commit
1fb7d4aac1@brouie Could you verify this on a fresh localnet when you have a moment?
Implemented (merged to `main`):
Global provisioning: `playwright.config.ts` now runs `e2e/global-setup.ts` before tests. In the default (strict) mode it waits for the LCD, requires `frontend-dapp/.env.local` from `scripts/deploy-dex-local.sh`, then runs `scripts/e2e-provision-dev-wallet.sh` inside the LocalTerra container. That script walks factory `pairs`, collects CW20 contract addresses, and idempotently mints top-ups to the simulated dev wallet (`terra1x46rqay4d3cssq8gxxvqz8xt6nwlz4td20k38v`) when any balance is below `E2E_DEV_MIN_CW20_U128` (default `1000000000000` raw units). Native uluna/uusd for gas remain from genesis (`docker/init-chain.sh`).
Strict vs optional: `REQUIRE_LOCALTERRA=0` skips global setup and restores skip behavior for LCD / pool CTAs (for jobs without a chain). Any other unset value keeps strict behavior.
Tests: `pool-tx.spec.ts` no longer uses `test.skip` for under-funded wallet on the default path; blocked submit labels and missing tx alerts fail with clear messages. `wrap-pool.spec.ts` transaction tests follow the same pattern. Amounts in pool-tx were adjusted to human `10` / `10` to avoid exhausting the wallet in one shot.
Docs: `frontend-dapp/e2e/README.md` + `docs/testing.md` document the one-command run (`pnpm exec playwright test e2e/pool-tx.spec.ts` or `npx playwright test e2e/pool-tx.spec.ts`), denoms, minimums, and `REQUIRE_LOCALTERRA`.
Suggested verification: `docker compose up -d localterra`, `bash scripts/deploy-dex-local.sh`, then `cd frontend-dapp && npx playwright test e2e/pool-tx.spec.ts`.
Thanks!
mentioned in issue #193
mentioned in issue #195
mentioned in issue #201