From 96697ffe17dbdf08b0bda26e2aa3255d05d0c6ff Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Sat, 7 Nov 2026 10:43:24 +0800 Subject: [PATCH] test(agents): use the native copy shortcut on every host --- e2e/agentMarkdown.spec.ts | 4 ++-- e2e/agentScroll.spec.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/agentMarkdown.spec.ts b/e2e/agentMarkdown.spec.ts index 0577c7a86..e1bd4c9e3 100644 --- a/e2e/agentMarkdown.spec.ts +++ b/e2e/agentMarkdown.spec.ts @@ -272,7 +272,7 @@ test("keeps chat history readable and selections free of timestamps and status l expect(selected).toContain("Hi Bob!"); expect(selected).toContain("What would you like me to proceed with?"); expect(selected).not.toMatch(/AM|PM|5s|Reasoning|Requesting task context/); - await page.keyboard.press("Meta+c"); + await page.keyboard.press("ControlOrMeta+c"); expect(await page.evaluate(() => navigator.clipboard.readText())).toBe(selected); await stream.locator("[class*='_thought_'] > summary").click(); await expect(stream.getByText("Requesting task context", { exact: true })).toBeVisible(); @@ -328,7 +328,7 @@ test("selects through code blocks and tables while keeping copy controls outside expect(selected).toContain(tree); expect(selected).toContain("程序入口"); expect(selected).toContain(flow); - await page.keyboard.press("Meta+c"); + await page.keyboard.press("ControlOrMeta+c"); expect(await page.evaluate(() => navigator.clipboard.readText())).toBe(selected); await page.evaluate(() => window.getSelection()!.removeAllRanges()); const copies = reply.getByRole("button", { name: "Copy Code", exact: true }); diff --git a/e2e/agentScroll.spec.ts b/e2e/agentScroll.spec.ts index 4b6680d51..8b18591de 100644 --- a/e2e/agentScroll.spec.ts +++ b/e2e/agentScroll.spec.ts @@ -105,7 +105,7 @@ for (const selected of [false, true]) { expect(result.text).toContain("Reply 79"); expect(result.after).toBe(result.text); await stream.focus(); - await page.keyboard.press("Meta+c"); + await page.keyboard.press("ControlOrMeta+c"); expect(await page.evaluate(() => navigator.clipboard.readText())).toBe(result.text); await page.evaluate(() => window.getSelection()!.removeAllRanges()); }