mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-15 01:10:43 +00:00
test: require channel action buttons
This commit is contained in:
@@ -173,7 +173,9 @@ describe("WhatsApp card actions", () => {
|
||||
expect(labels).not.toContain("Relink");
|
||||
expect(labels).not.toContain("Wait for scan");
|
||||
|
||||
buttons.find((button) => button.textContent?.trim() === "Show QR")?.click();
|
||||
const showQr = buttons.find((button) => button.textContent?.trim() === "Show QR");
|
||||
expect(showQr).toBeInstanceOf(HTMLButtonElement);
|
||||
showQr!.click();
|
||||
expect(onWhatsAppStart).toHaveBeenCalledWith(false);
|
||||
});
|
||||
|
||||
@@ -187,7 +189,9 @@ describe("WhatsApp card actions", () => {
|
||||
expect(labels).toContain("Relink");
|
||||
expect(labels).not.toContain("Show QR");
|
||||
|
||||
buttons.find((button) => button.textContent?.trim() === "Relink")?.click();
|
||||
const relink = buttons.find((button) => button.textContent?.trim() === "Relink");
|
||||
expect(relink).toBeInstanceOf(HTMLButtonElement);
|
||||
relink!.click();
|
||||
expect(onWhatsAppStart).toHaveBeenCalledWith(true);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user