fix: separate target health from replay playback

This commit is contained in:
lda
2026-07-12 15:06:25 +07:00 Verified
parent 35ee86bf9d
commit 8926cb9aef
6 changed files with 54 additions and 25 deletions
@@ -95,7 +95,17 @@ describe("usePresentationTargetStatus", () => {
);
await waitFor(() => expect(result.current.liveTargetReady).toBe(true));
expect(result.current.status.kind).toBe("replay");
expect(result.current.status.kind).toBe("ready");
expect(result.current.status.label).toBe("Live target ready");
});
it("does not probe when health probing is disabled", async () => {
const { result } = renderHook(() =>
usePresentationTargetStatus(target, replayState, false),
);
await waitFor(() => expect(result.current.status.kind).toBe("replay"));
expect(mockedCallOperation).not.toHaveBeenCalled();
});
it("retries health without changing replay playback", async () => {