Skip to content

feat: add E2E integration test suite#48

Open
ottovlotto wants to merge 6 commits intomainfrom
feat/e2e-tests
Open

feat: add E2E integration test suite#48
ottovlotto wants to merge 6 commits intomainfrom
feat/e2e-tests

Conversation

@ottovlotto
Copy link
Copy Markdown
Collaborator

@ottovlotto ottovlotto commented Apr 24, 2026

Summary

  • Add 27 E2E tests across 7 test files covering all CLI commands (install, build, init, session, deploy, mod, diagnostic)
  • 9 fixture projects: frontend-only (real builds), Foundry, Hardhat, CDM, multi-contract, broken-contract, constructor-args, contracts-only, monorepo
  • Deploy tests verify contract detection for Foundry, Hardhat, and CDM backends with --contracts flag
  • CI workflow with daily schedule, Bun + IPFS (Kubo) setup, and Paseo testnet connectivity
  • Dedicated funder account, monitors funder balance and auto-creates GitHub issue when low

Architecture

Tests spawn dot as a child process via execa, assert on stdout/stderr/exit codes, and verify on-chain state via @polkadot-apps/chain-client.

Session isolation uses HOME env 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 //Alice dev accounts.

CI secrets required

  • E2E_FUNDER_SEED — seed for a funded Paseo testnet account

Test 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
  • CI workflow runs successfully with secrets configured

🤖 Generated with Claude Code

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.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Dev build ready — try this branch:

curl -fsSL https://raw.githubusercontent.com/paritytech/playground-cli/main/install.sh | VERSION=dev/feat/e2e-tests bash

Comment thread e2e/cli/deploy.test.ts Fixed
…tion or class'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@ottovlotto
Copy link
Copy Markdown
Collaborator Author

ottovlotto commented Apr 24, 2026

@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.
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