@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.
- package/README.md +11 -32
- 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
|
|
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: '
|
|
45
|
+
wallets: [{ type: 'metamask' }]
|
|
46
46
|
})
|
|
47
47
|
|
|
48
48
|
test('connect wallet and sign transaction', async ({ page, wallets }) => {
|
|
49
|
-
const
|
|
49
|
+
const metamask = wallets.metamask
|
|
50
50
|
|
|
51
|
-
await
|
|
52
|
-
|
|
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
|
|
57
|
+
await metamask.authorize()
|
|
60
58
|
|
|
61
59
|
await page.click('button:has-text("Send Transaction")')
|
|
62
|
-
await
|
|
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: '
|
|
72
|
+
wallets: [{ type: 'metamask' }, { type: 'talisman' }]
|
|
75
73
|
})
|
|
76
74
|
|
|
77
75
|
test('multi-wallet test', async ({ page, wallets }) => {
|
|
78
|
-
const
|
|
76
|
+
const metamask = wallets.metamask
|
|
79
77
|
const talisman = wallets.talisman
|
|
80
78
|
|
|
81
|
-
await
|
|
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
|
|
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
|