Skip to content

Commit 2a355f9

Browse files
committed
Test packaged action bridge
1 parent d1ad914 commit 2a355f9

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// @ts-nocheck
2+
import assert from "node:assert/strict";
3+
import { readFileSync } from "node:fs";
4+
import test from "node:test";
5+
6+
const source = readFileSync(new URL("./interaction-hotfix.ts", import.meta.url), "utf8");
7+
const index = readFileSync(new URL("../../index.html", import.meta.url), "utf8");
8+
9+
test("critical packaged actions use delegated handling", () => {
10+
assert.match(source, /data-connector-connect/);
11+
assert.match(source, /#rtk-install/);
12+
assert.match(source, /#autopilot-start/);
13+
assert.match(source, /stopImmediatePropagation/);
14+
});
15+
16+
test("action progress and failures stay visible", () => {
17+
assert.match(source, /persistent-action-status/);
18+
assert.match(source, /Action failed:/);
19+
});
20+
21+
test("saved connector state is reconciled before hydration", () => {
22+
assert.match(source, /token-saver\.workspace\.v1/);
23+
assert.ok(index.indexOf("interaction-hotfix.ts") < index.indexOf("main.ts"));
24+
});

0 commit comments

Comments
 (0)