| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
23 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,7 +16,7 @@ export const IS_MACOS = platform() === "darwin"; | |||
| 16 | 16 | ||
| 17 | 17 | // ── Config ────────────────────────────────────────────────────────────────── | |
| 18 | 18 | ||
| 19 | - export const APP_NAME = "screenpipe-app"; | ||
| 19 | + export const APP_NAME = process.env.SCREENPIPE_APP_NAME ?? "screenpipe"; | ||
| 20 | 20 | export const HEALTH_URL = "http://localhost:3030/health"; | |
| 21 | 21 | export const SEARCH_URL = "http://localhost:3030/search"; | |
| 22 | 22 | export const TIMEOUT_SHORT = 5_000; | |
@@ -199,6 +199,7 @@ export function summary(): boolean { | |||
| 199 | 199 | ||
| 200 | 200 | /** Run bb CLI and return parsed JSON output */ | |
| 201 | 201 | export async function bb(...args: string[]): Promise<any> { | |
| 202 | + if (!BB) throw new Error("bb not available — install bigbrother CLI"); | ||
| 202 | 203 | const proc = Bun.spawnSync([BB, ...args]); | |
| 203 | 204 | const stdout = proc.stdout.toString().trim(); | |
| 204 | 205 | if (proc.exitCode !== 0) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | import { | |
| 2 | 2 | suite, test, summary, screenshot, assertHealthField, | |
| 3 | - assertExists, bb, fetchJson, HEALTH_URL, | ||
| 3 | + assertExists, bb, fetchJson, HEALTH_URL, waitForHealth, sleep, | ||
| 4 | 4 | sel, IS_WINDOWS, IS_MACOS, isScreenpipeRunning, | |
| 5 | 5 | } from "./lib"; | |
| 6 | 6 | ||
@@ -11,8 +11,7 @@ await test("app process running", async () => { | |||
| 11 | 11 | }); | |
| 12 | 12 | ||
| 13 | 13 | await test("health API responds", async () => { | |
| 14 | - const res = await fetch("http://localhost:3030/health"); | ||
| 15 | - if (!res.ok) throw new Error(`health returned ${res.status}`); | ||
| 14 | + await waitForHealth(30); | ||
| 16 | 15 | }); | |
| 17 | 16 | ||
| 18 | 17 | await test("health frame_status ok", () => assertHealthField("frame_status", "ok")); | |
@@ -29,6 +28,11 @@ await test("health status acceptable", async () => { | |||
| 29 | 28 | } | |
| 30 | 29 | }); | |
| 31 | 30 | ||
| 31 | + await test("health has audio_status", async () => { | ||
| 32 | + const health = await fetchJson(HEALTH_URL); | ||
| 33 | + if (health.audio_status === undefined) throw new Error("no audio_status"); | ||
| 34 | + }); | ||
| 35 | + | ||
| 32 | 36 | if (IS_MACOS) { | |
| 33 | 37 | await test("health audio_status ok", () => assertHealthField("audio_status", "ok")); | |
| 34 | 38 | ||
@@ -126,7 +130,7 @@ await test("concurrent API calls don't race (S9.4)", async () => { | |||
| 126 | 130 | console.log(` 3 concurrent API calls: ${elapsed}ms`); | |
| 127 | 131 | }); | |
| 128 | 132 | ||
| 129 | - await screenshot("01-tray-health"); | ||
| 133 | + await screenshot("01-app-launch"); | ||
| 130 | 134 | ||
| 131 | 135 | const ok = summary(); | |
| 132 | 136 | process.exit(ok ? 0 : 1); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments