Open
Conversation
Add comprehensive E2E tests that spawn the CLI as a child process and verify behavior against stdout/stderr/exit codes and on-chain state. - 27 tests across 7 files: install, build, init, session, deploy, mod, diagnostic - 9 fixture projects covering frontend-only, Foundry, Hardhat, CDM, multi-contract - Typed execa wrapper, Paseo chain client, registry/funder query helpers - Global setup with funder balance monitoring and auto GitHub issue creation - CI workflow with daily schedule, Bun, IPFS (Kubo), and Paseo testnet access - Deploy tests cover contract detection for all backend types and --contracts flag Session injection (phone-mode signing tests) is blocked on paritytech/polkadot-apps#109 and will be added as Layer 2.
Contributor
|
Dev build ready — try this branch: |
…tion or class' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Collaborator
Author
|
@mordamax here is my CLI test suite :) (so not part of the in-host set of test so that's why i put it on this repo) As you advised, I instructed Claude to do a thorough review as QA/SDeT engineer, and I also asked it to take a robust approach with no technical debt (to avoid it doing the high level / UI only tests that aren't actually checking much lol) cc @charlesHetterich @UtkarshBhardwaj007 @ReinhardHatko as an FYI :) :) |
Use a dedicated testnet account for E2E test funding instead of the well-known Alice dev account. Rename MASTER_FUNDER_SEED → E2E_FUNDER_SEED to make the purpose clear. Funder address: 5GLMswFYUU1RgKaQDaqsT9XdGGh4kPbSo1NF7gLiZJZg8Hmx
These are public values (registered app in Paseo registry), not secrets.
dot init -y installs toolchains (rustup) into the temp HOME. Child processes may still be writing when afterEach fires, causing ENOTEMPTY on rmSync. Wrap in try/catch — these are temp dirs the OS cleans.
The re-deploy test runs two full deploys back-to-back which can exceed 120s on CI. Bump to 300s. Also catch DisjointError in teardown when the WebSocket is already torn down from heartbeat timeouts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--contractsflagArchitecture
Tests spawn
dotas a child process viaexeca, assert on stdout/stderr/exit codes, and verify on-chain state via@polkadot-apps/chain-client.Session isolation uses
HOMEenv override — each test gets a temp dir so session files don't leak between tests or pollute the host.What's not included (Layer 2 — blocked on paritytech/polkadot-apps#109)
Phone-mode signing tests require session injection, which needs an upstream
createTestSession()helper from@polkadot-apps/terminal. Filed as paritytech/polkadot-apps#109. Until then, all tests use--suri //Alicedev accounts.CI secrets required
E2E_FUNDER_SEED— seed for a funded Paseo testnet accountTest plan
pnpm test— 347 unit tests pass (no regressions)pnpm test:e2e— 24/27 pass locally, 3 need IPFS + funded testnet (CI)pnpm format:check— passes🤖 Generated with Claude Code