Introduction
End-to-end testing library for wallet interactions across multiple blockchain ecosystems
Chroma is an end-to-end (E2E) testing library for wallet interactions across multiple blockchain ecosystems. It enables developers to write automated tests that interact with real wallet extensions, providing a comprehensive testing solution for decentralized applications (dApps).
Initially designed for the Polkadot ecosystem, Chroma is expanding to support EVM (Ethereum Virtual Machine) and SVM (Solana Virtual Machine) chains.
Features
- Easy Extension Setup - Download wallet extensions with a single command
- Multi-Wallet Support - Test with multiple wallet extensions simultaneously
- TypeScript Support - Full type safety and autocomplete
- VS Code Integration - Works with Playwright Test for VS Code
Quick Example
import { createWalletTest } from '@avalix/chroma'
const test = createWalletTest({
wallets: [{
type: 'polkadot-js'
}]
})
test('connect wallet', async ({ page, wallets }) => {
const polkadotJs = wallets['polkadot-js']
await polkadotJs.importMnemonic({
seed: 'bottom drive obey lake curtain smoke basket hold race lonely fit walk'
})
await page.goto('http://localhost:3000')
await polkadotJs.authorize()
await polkadotJs.approveTx()
})