Installation
Install Chroma and configure your project
Prerequisites
- Node.js 24 or higher
- A package manager (npm, yarn, pnpm, or bun)
Existing Project
If your project already has Playwright installed, simply add Chroma:
npm install @avalix/chromaIf Playwright is not yet installed, initialize it first:
npm init playwright@latestThen add Chroma:
npm install @avalix/chromaAdd Scripts
Add these scripts to your package.json:
{
"scripts": {
"test": "npx playwright test",
"test:ui": "npx playwright test --ui",
"test:prepare": "chroma download-extensions"
}
}Setup .gitignore
Add .chroma to your .gitignore file:
.chromaDownload Wallet Extensions
Run the prepare script to download wallet extensions:
npm run test:prepareThis will download the supported wallet extensions to the .chroma directory.
Running Tests
Run tests in headless mode:
npm testTo run tests with UI mode (headed), use:
npm run test:uiUI mode opens Playwright's interactive test runner where you can see the browser, step through tests, and debug visually.