test: require chat action buttons · openclaw/openclaw@fd443f8
shakkernerd
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -427,7 +427,8 @@ describe("chat compaction divider", () => {
|
427 | 427 | const button = container.querySelector<HTMLButtonElement>(".chat-divider__action"); |
428 | 428 | expect(button?.textContent).toContain("Open checkpoints"); |
429 | 429 | |
430 | | -button?.click(); |
| 430 | +expect(button).toBeInstanceOf(HTMLButtonElement); |
| 431 | +button!.click(); |
431 | 432 | |
432 | 433 | expect(onOpenSessionCheckpoints).toHaveBeenCalledTimes(1); |
433 | 434 | }); |
@@ -509,7 +510,9 @@ describe("chat voice controls", () => {
|
509 | 510 | 'Realtime voice provider "openai" is not configured', |
510 | 511 | ); |
511 | 512 | |
512 | | -container.querySelector<HTMLButtonElement>('[aria-label="Dismiss error"]')?.click(); |
| 513 | +const dismiss = container.querySelector<HTMLButtonElement>('[aria-label="Dismiss error"]'); |
| 514 | +expect(dismiss).toBeInstanceOf(HTMLButtonElement); |
| 515 | +dismiss!.click(); |
513 | 516 | |
514 | 517 | expect(onDismissError).toHaveBeenCalledTimes(1); |
515 | 518 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。