Overview
Chroma provides a CLI for downloading wallet browser extensions required for testing.Installation
The CLI is available when you install Chroma:Commands
download-extensions
Download all supported wallet extensions to your project. Usage:- Clears any existing
.chromadirectory in your project root - Downloads the following wallet extensions:
- Polkadot-JS extension
- Talisman extension
- MetaMask extension
- Extracts each extension to
.chroma/[extension-name]/
- During initial setup of your test environment
- In CI/CD pipelines before running tests
- When you need to update to the latest extension versions
- After cleaning your project directory
Download locations
Extensions are downloaded to:Add
.chroma/ to your .gitignore file to avoid committing extension files to your repository.CI/CD integration
- GitHub Actions
- GitLab CI
- CircleCI
Caching extensions
To speed up CI builds, you can cache the.chroma directory:
Custom download URLs
If you need to use specific versions or custom builds of wallet extensions, you can provide custom download URLs in your test configuration:download-extensions command will still download the default versions. You’ll need to manually download and place custom extensions in the .chroma directory.
Troubleshooting
Extensions not found
If tests fail with “extension not found” errors:- Run
npx chroma download-extensionsto download extensions - Verify
.chromadirectory exists in your project root - Check that
.chromais not in your.gitignoreif you’re running in CI
Download failures
If the download command fails:- Check your internet connection
- Verify you’re not behind a firewall blocking extension downloads
- Try running with increased timeout:
CHROMA_DOWNLOAD_TIMEOUT=60000 npx chroma download-extensions - Check GitHub rate limits if downloading from GitHub releases
Permission errors
If you get permission errors when extracting extensions:- Ensure your user has write permissions to the project directory
- On CI, verify the build user has write access
- Try deleting the
.chromadirectory and running the command again
Related
- Installation - Initial setup guide
- createWalletTest - Test configuration