Chroma

July 7, 2026 · View on GitHub

End-to-end testing library for Polkadot, Ethereum, and Solana wallet interactions using Playwright.

Quick Start

npm install @avalix/chroma @playwright/test
npx chroma download-extensions

By default all supported wallet extensions are downloaded. Use --wallets to download only the ones you need:

npx chroma download-extensions --wallets metamask
npx chroma download-extensions --wallets polkadot-js,talisman
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()
})

For detailed tutorials and guides, visit the Documentation

Supported Wallets & Chains

Supported Chains

ChainStatus
Polkadot✅ Supported
Ethereum✅ Supported
Solana✅ Supported

Supported Wallets

WalletStatusVersion
Polkadot JS Extension✅ Supportedv0.62.6
Talisman✅ Supportedv3.1.13
SubWallet⏳ Planned-
MetaMask✅ Supportedv13.17.0 (Flask)

Test Matrix

For detailed test coverage and mapping of features to tests, see TEST_MATRIX.md.

Running Tests

Unit Tests

cd packages/chroma
bun run test:unit:coverage

E2E Tests (Local)

# Polkadot-JS dApp
cd packages/e2e-polkadot-js
bun run test

# EVM dApp
cd packages/e2e-evm
bun run test

# Solana dApp
cd packages/e2e-solana
bun run test

E2E Tests (Docker)

# Build the Docker image
docker build -t chroma-test .

# Run e2e-polkadot-js tests
docker run --rm --shm-size=2gb -e E2E_TARGET=polkadot-js chroma-test

# Run e2e-evm tests
docker run --rm --shm-size=2gb -e E2E_TARGET=evm chroma-test

# Run e2e-solana tests
docker run --rm --shm-size=2gb -e E2E_TARGET=solana chroma-test

# Interactive debugging
docker run -it --rm --shm-size=2gb chroma-test bash

Project Structure

packages/
├── chroma/                       # Main library
│   ├── src/                      # Source code
│   │   ├── context-playwright/   # Playwright fixtures
│   │   ├── wallets/              # Wallet implementations
│   │   └── utils/                # Utilities
│   └── tests/                    # E2E tests playground for the library
├── e2e-polkadot-js/              # Polkadot dApp example
├── e2e-evm/                      # EVM dApp example
└── e2e-solana/                   # Solana dApp example

License

MIT