@avalix/chroma 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +11 -32
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -22,7 +22,7 @@ Before running your tests, you need to download the wallet extensions:
22
22
  npx chroma download-extensions
23
23
  ```
24
24
 
25
- This will download the wallet extensions (Polkadot JS and Talisman) to `./.chroma` directory in your project root.
25
+ This will download the wallet extensions (e.g. MetaMask, Polkadot JS, Talisman) to `./.chroma` directory in your project root.
26
26
 
27
27
  **Tip**: Add this to your `package.json` scripts for convenience:
28
28
 
@@ -42,24 +42,22 @@ This will download the wallet extensions (Polkadot JS and Talisman) to `./.chrom
42
42
  import { createWalletTest, expect } from '@avalix/chroma'
43
43
 
44
44
  const test = createWalletTest({
45
- wallets: [{ type: 'polkadot-js' }]
45
+ wallets: [{ type: 'metamask' }]
46
46
  })
47
47
 
48
48
  test('connect wallet and sign transaction', async ({ page, wallets }) => {
49
- const polkadotJs = wallets['polkadot-js']
49
+ const metamask = wallets.metamask
50
50
 
51
- await polkadotJs.importMnemonic({
52
- seed: 'bottom drive obey lake curtain smoke basket hold race lonely fit walk',
53
- name: 'Test Account',
54
- password: 'securePassword123'
51
+ await metamask.importSeedPhrase({
52
+ seedPhrase: 'test test test test test test test test test test test junk'
55
53
  })
56
54
 
57
55
  await page.goto('http://localhost:3000')
58
56
  await page.click('button:has-text("Connect Wallet")')
59
- await polkadotJs.authorize()
57
+ await metamask.authorize()
60
58
 
61
59
  await page.click('button:has-text("Send Transaction")')
62
- await polkadotJs.approveTx({ password: 'securePassword123' })
60
+ await metamask.confirm()
63
61
 
64
62
  await expect(page.locator('.transaction-success')).toBeVisible()
65
63
  })
@@ -71,40 +69,21 @@ test('connect wallet and sign transaction', async ({ page, wallets }) => {
71
69
  import { createWalletTest } from '@avalix/chroma'
72
70
 
73
71
  const test = createWalletTest({
74
- wallets: [{ type: 'polkadot-js' }, { type: 'talisman' }]
72
+ wallets: [{ type: 'metamask' }, { type: 'talisman' }]
75
73
  })
76
74
 
77
75
  test('multi-wallet test', async ({ page, wallets }) => {
78
- const polkadotJs = wallets['polkadot-js']
76
+ const metamask = wallets.metamask
79
77
  const talisman = wallets.talisman
80
78
 
81
- await polkadotJs.importMnemonic({ seed: '...', name: 'Alice' })
79
+ await metamask.importSeedPhrase({ seedPhrase: 'test test test test test test test test test test test junk' })
82
80
  await talisman.importEthPrivateKey({ privateKey: '0x...', name: 'Bob' })
83
81
 
84
82
  await page.goto('http://localhost:3000')
85
- await polkadotJs.authorize()
83
+ await metamask.authorize()
86
84
  })
87
85
  ```
88
86
 
89
- ## Supported Wallets & Chains
90
-
91
- ### Supported Chains
92
-
93
- | Chain | Status |
94
- |-------|--------|
95
- | Polkadot | ✅ Supported |
96
- | Ethereum | ✅ Supported |
97
- | Solana | ⏳ Planned |
98
-
99
- ### Supported Wallets
100
-
101
- | Wallet | Status | Version |
102
- |--------|--------|---------|
103
- | Polkadot JS Extension | ✅ Supported | v0.62.6 |
104
- | Talisman | ✅ Supported | v3.1.13 |
105
- | SubWallet | ⏳ Planned | - |
106
- | MetaMask | ⏳ Planned | - |
107
-
108
87
  ## Features
109
88
 
110
89
  - **Easy Extension Setup** - Download wallet extensions with a single command
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@avalix/chroma",
3
3
  "type": "module",
4
- "version": "0.0.15",
4
+ "version": "0.0.16",
5
5
  "description": "End-to-end testing library for Polkadot wallet interactions",
6
6
  "author": "Avalix Labs",
7
7
  "license": "MIT",