w3wallets 0.2.0 → 0.2.1
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 +6 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +4 -7
package/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|

|
|
4
4
|
[](https://www.npmjs.com/package/w3wallets)
|
|
5
5
|

|
|
6
|
+
[](https://github.com/Maksandre/w3wallets/actions/workflows/playwright.yml)
|
|
6
7
|
|
|
7
8
|
Web3 wallets for Playwright.
|
|
8
9
|
|
|
@@ -16,6 +17,11 @@ npm install -D w3wallets
|
|
|
16
17
|
|
|
17
18
|
The `Backpack` and the `Polkadot{.js}` wallets are currently supported.
|
|
18
19
|
|
|
20
|
+
<p align="center">
|
|
21
|
+
<img src="https://raw.githubusercontent.com/coral-xyz/backpack/refs/heads/master/assets/backpack.png" alt="Backpack Logo" width="60"/>
|
|
22
|
+
<img src="https://polkadot.js.org/logo.svg" alt="Polkadot JS Logo" width="60"/>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
19
25
|
#### 1. Download wallets
|
|
20
26
|
|
|
21
27
|
```sh
|
|
@@ -34,8 +40,6 @@ import { withWallets } from "../src/withWallets";
|
|
|
34
40
|
const test = withWallets(base, "backpack", "polkadotJS");
|
|
35
41
|
|
|
36
42
|
test("has title", async ({ page, backpack }) => {
|
|
37
|
-
await page.goto("https://playwright.dev/");
|
|
38
|
-
|
|
39
43
|
const privateKey =
|
|
40
44
|
"4wDJd9Ds5ueTdS95ReAZGSBVkjMcNKbgZk47xcmqzpUJjCt7VoB2Cs7hqwXWRnopzXqE4mCP6BEDHCYrFttEcBw2";
|
|
41
45
|
|
package/dist/index.js
CHANGED
|
@@ -191,13 +191,13 @@ function withWallets(test, ...config) {
|
|
|
191
191
|
extensionPaths.push(polkadotJSPath);
|
|
192
192
|
}
|
|
193
193
|
const context = await import_test3.chromium.launchPersistentContext(userDataDir, {
|
|
194
|
-
headless:
|
|
194
|
+
headless: testInfo.project.use.headless ?? true,
|
|
195
|
+
channel: "chromium",
|
|
195
196
|
args: [
|
|
196
197
|
`--disable-extensions-except=${extensionPaths.join(",")}`,
|
|
197
198
|
`--load-extension=${extensionPaths.join(",")}`
|
|
198
199
|
]
|
|
199
200
|
});
|
|
200
|
-
await context.waitForEvent("serviceworker");
|
|
201
201
|
while (context.serviceWorkers().length < extensionPaths.length) {
|
|
202
202
|
await sleep(1e3);
|
|
203
203
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -157,13 +157,13 @@ function withWallets(test, ...config) {
|
|
|
157
157
|
extensionPaths.push(polkadotJSPath);
|
|
158
158
|
}
|
|
159
159
|
const context = await chromium.launchPersistentContext(userDataDir, {
|
|
160
|
-
headless:
|
|
160
|
+
headless: testInfo.project.use.headless ?? true,
|
|
161
|
+
channel: "chromium",
|
|
161
162
|
args: [
|
|
162
163
|
`--disable-extensions-except=${extensionPaths.join(",")}`,
|
|
163
164
|
`--load-extension=${extensionPaths.join(",")}`
|
|
164
165
|
]
|
|
165
166
|
});
|
|
166
|
-
await context.waitForEvent("serviceworker");
|
|
167
167
|
while (context.serviceWorkers().length < extensionPaths.length) {
|
|
168
168
|
await sleep(1e3);
|
|
169
169
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "w3wallets",
|
|
3
3
|
"description": "browser wallets for playwright",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"homepage": "https://github.com/Maksandre/w3wallets",
|
|
@@ -31,8 +31,9 @@
|
|
|
31
31
|
],
|
|
32
32
|
"bin": "./src/scripts/download.js",
|
|
33
33
|
"scripts": {
|
|
34
|
-
"start:ui": "yarn workspace @w3wallets/test-app
|
|
35
|
-
"
|
|
34
|
+
"start:ui": "yarn workspace @w3wallets/test-app buildAndStart",
|
|
35
|
+
"download-wallets": "npx w3wallets backpack polkadotJS",
|
|
36
|
+
"test": "npx playwright test --project=ci",
|
|
36
37
|
"build": "tsup",
|
|
37
38
|
"clean": "rm -rf dist",
|
|
38
39
|
"check-format": "prettier --check .",
|
|
@@ -43,10 +44,6 @@
|
|
|
43
44
|
"changeset": "npx changeset",
|
|
44
45
|
"local-release": "changeset version && changeset publish"
|
|
45
46
|
},
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"follow-redirects": "^1.15.9",
|
|
48
|
-
"unzip-crx": "^0.2.0"
|
|
49
|
-
},
|
|
50
47
|
"devDependencies": {
|
|
51
48
|
"@arethetypeswrong/cli": "^0.17.2",
|
|
52
49
|
"@changesets/cli": "^2.27.11",
|