testsurfer 0.1.0 → 0.1.2
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 +23 -3
- package/dist/client.d.ts +2 -2
- package/dist/client.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,7 +30,27 @@ Node 22.18 or newer runs the `.ts` test files directly.
|
|
|
30
30
|
|
|
31
31
|
vibesurfer is a daemon that owns one real WebKit engine and speaks a line protocol over a Unix socket. testsurfer is a TypeScript client for that protocol. It opens a session, resolves your locators against the live accessibility tree, and handles the daemon's optimistic-concurrency tokens internally. You never see a token, a ref, or a retry.
|
|
32
32
|
|
|
33
|
-
The daemon is fetched automatically. If `vs` is not on your PATH, testsurfer runs `npx vibesurfer@0.2.
|
|
33
|
+
The daemon is fetched automatically. If `vs` is not on your PATH, testsurfer runs `npx vibesurfer@0.2.14` (pinned, checksum-verified) to download and start it. Set `TESTSURFER_VS` to point at a specific binary. testsurfer reads the daemon's protocol version and feature flags at launch and uses what it offers, so a newer `vs` on your PATH works too.
|
|
34
|
+
|
|
35
|
+
## CI
|
|
36
|
+
|
|
37
|
+
testsurfer runs on macOS and Linux GitHub runners. On Linux it needs WebKitGTK 6 and an X display; the action in this repo installs both and starts the pinned vibesurfer daemon:
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
jobs:
|
|
41
|
+
test:
|
|
42
|
+
runs-on: ubuntu-24.04 # or macos-15
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v4
|
|
45
|
+
- uses: actions/setup-node@v4
|
|
46
|
+
with:
|
|
47
|
+
node-version: 24
|
|
48
|
+
- run: npm ci
|
|
49
|
+
- uses: frane/testsurfer@v0
|
|
50
|
+
- run: node --test tests/
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`vibesurfer-version` overrides the pinned daemon. This repo's own CI runs the same action on both runners. Windows (WebView2) is supported by vibesurfer but not yet tested here.
|
|
34
54
|
|
|
35
55
|
## API
|
|
36
56
|
|
|
@@ -137,11 +157,11 @@ await browser.close();
|
|
|
137
157
|
|
|
138
158
|
## Status
|
|
139
159
|
|
|
140
|
-
Version 0.1 pins vibesurfer 0.2.
|
|
160
|
+
Version 0.1 pins vibesurfer 0.2.14 and speaks its frozen wire protocol (v1). Older daemons work for everything except `level`, `checked` and `<label>` lookups, which need the tree attributes 0.2.12 added. Known issue: on some macOS 27 machines each WebKit navigation stalls for about ten seconds inside the engine, which makes suites much slower than the benchmark below; it is tracked in the vibesurfer repo.
|
|
141
161
|
|
|
142
162
|
## Benchmark
|
|
143
163
|
|
|
144
|
-
[`bench/`](bench) runs identical flows through testsurfer and Playwright (WebKit and Chromium) against the same app and reports the numbers, favorable and not. On
|
|
164
|
+
[`bench/`](bench) runs identical flows through testsurfer and Playwright (WebKit and Chromium) against the same app and reports the numbers, favorable and not. On GitHub runners with vibesurfer 0.2.14, testsurfer launches in 3-11ms against Playwright's 0.4-1.3s. The four-flow suite takes 702-968ms on macOS against 561-627ms for Playwright-WebKit and 416-483ms for Playwright-Chromium, and 842-873ms on Linux against 549-664ms and 368-408ms. A working install is ~6MB against ~300MB+ per Playwright browser. The full tables, methodology and history are in the bench README; the `bench` workflow reproduces them.
|
|
145
165
|
|
|
146
166
|
## Example
|
|
147
167
|
|
package/dist/client.d.ts
CHANGED
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { type Flags, type WireResponse } from './wire.ts';
|
|
15
15
|
/** The vibesurfer release testsurfer is built and tested against. */
|
|
16
|
-
export declare const PINNED_VIBESURFER = "0.2.
|
|
16
|
+
export declare const PINNED_VIBESURFER = "0.2.14";
|
|
17
17
|
export interface ClientOptions {
|
|
18
18
|
/** Socket path. Default: `~/.vibesurfer/daemon.sock`. */
|
|
19
19
|
socketPath?: string;
|
|
20
|
-
/** Command used to reach the vs binary, e.g. `['vs']` or `['npx', '-y', 'vibesurfer@0.2.
|
|
20
|
+
/** Command used to reach the vs binary, e.g. `['vs']` or `['npx', '-y', 'vibesurfer@0.2.14']`. */
|
|
21
21
|
vsCommand?: string[];
|
|
22
22
|
/** Per-request timeout in ms. Default 70000 (above the daemon's 60s wait cap). */
|
|
23
23
|
requestTimeout?: number;
|
package/dist/client.js
CHANGED
|
@@ -18,7 +18,7 @@ import { execFile } from 'node:child_process';
|
|
|
18
18
|
import { WireError, TimeoutError } from "./errors.js";
|
|
19
19
|
import { encodeRequest, parseEnvelope, parseWarning, } from "./wire.js";
|
|
20
20
|
/** The vibesurfer release testsurfer is built and tested against. */
|
|
21
|
-
export const PINNED_VIBESURFER = '0.2.
|
|
21
|
+
export const PINNED_VIBESURFER = '0.2.14';
|
|
22
22
|
export function defaultSocketPath() {
|
|
23
23
|
return path.join(os.homedir(), '.vibesurfer', 'daemon.sock');
|
|
24
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testsurfer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "End-to-end testing for the web, driven by vibesurfer. Playwright-style locators and auto-retrying assertions over a real WebKit engine with trusted native input.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|