(home: string)
| 61 | // which is exactly when firstWindow resolves — so this is always safe to read |
| 62 | // after the window is up. |
| 63 | const readSidecar = (home: string): SidecarConn => { |
| 64 | const manifest = JSON.parse( |
| 65 | readFileSync(join(home, ".executor/server-control/server.json"), "utf8"), |
| 66 | ) as { connection: { origin: string; auth?: { token?: string } } }; |
| 67 | const origin = manifest.connection.origin; |
| 68 | const token = manifest.connection.auth?.token; |
| 69 | expect(typeof origin, "sidecar origin in the manifest").toBe("string"); |
| 70 | expect(typeof token, "sidecar bearer token in the manifest").toBe("string"); |
| 71 | return { origin, token: token! }; |
| 72 | }; |
| 73 | |
| 74 | const closeWithVideo = async (app: ElectronApplication, runDir: string, home: string) => { |
| 75 | const page = app.windows()[0]; |
no outgoing calls
no test coverage detected