repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

Add ui real rpc smoke

2a7b4df1aabc3d014423436840162c00845d48ff

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (1)

extensions/ui/__e2e__/real-rpc-smoke.spec.ts

Added
new file mode 100644
1 +import { spawnSync } from "node:child_process";
2 +import { expect, test } from "@playwright/test";
4 +test("real Pi RPC smoke prerequisites", async () => {
5 + test.skip(
6 + process.env.UI_REAL_RPC_SMOKE !== "1",
7 + "Set UI_REAL_RPC_SMOKE=1 to run the real Pi RPC/browser smoke tier.",
8 + );
9 + const pi = process.platform === "win32" ? "pi.cmd" : "pi";
10 + const probe = spawnSync(pi, ["--version"], { encoding: "utf8" });
11 + test.skip(probe.error?.code === "ENOENT", "pi CLI is unavailable on PATH.");
12 + expect(probe.status).toBe(0);
13 +});