test: tighten talk and session controls · openclaw/openclaw@43d9b44
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -59,6 +59,9 @@ describe("OpenClawApp Talk controls", () => {
|
59 | 59 | expect(startMock).toHaveBeenCalledOnce(); |
60 | 60 | expect(stopMock).not.toHaveBeenCalled(); |
61 | 61 | expect(app.realtimeTalkStatus).toBe("connecting"); |
62 | | -expect(app.realtimeTalkSession).not.toBeNull(); |
| 62 | +expect(app.realtimeTalkSession).toMatchObject({ |
| 63 | +start: startMock, |
| 64 | +stop: stopMock, |
| 65 | +}); |
63 | 66 | }); |
64 | 67 | }); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -629,8 +629,11 @@ describe("sessions view", () => {
|
629 | 629 | const checkbox = rows[0]?.querySelector<HTMLInputElement>("input[type=checkbox]"); |
630 | 630 | expect(checkbox).toBeInstanceOf(HTMLInputElement); |
631 | 631 | expect(rows[1]).toBeInstanceOf(HTMLTableRowElement); |
632 | | -checkbox!.dispatchEvent(new MouseEvent("click", { bubbles: true })); |
633 | | -rows[1]!.dispatchEvent(new MouseEvent("click", { bubbles: true })); |
| 632 | +if (!(checkbox instanceof HTMLInputElement) || !(rows[1] instanceof HTMLTableRowElement)) { |
| 633 | +throw new Error("Expected checkpoint toggle row controls"); |
| 634 | +} |
| 635 | +checkbox.dispatchEvent(new MouseEvent("click", { bubbles: true })); |
| 636 | +rows[1].dispatchEvent(new MouseEvent("click", { bubbles: true })); |
634 | 637 | |
635 | 638 | expect(onToggleCheckpointDetails).not.toHaveBeenCalled(); |
636 | 639 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。