Chroma

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/chroma

If Playwright is not yet installed, initialize it first:

npm init playwright@latest

Then add Chroma:

npm install @avalix/chroma

Add Scripts

Add these scripts to your package.json:

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:

.gitignore
.chroma

Download Wallet Extensions

Run the prepare script to download wallet extensions:

npm run test:prepare

This will download the supported wallet extensions to the .chroma directory.

Running Tests

Run tests in headless mode:

npm test

To run tests with UI mode (headed), use:

npm run test:ui

UI mode opens Playwright's interactive test runner where you can see the browser, step through tests, and debug visually.

Next Steps

On this page