GeezerVison is showing github.com — test(web): cover Alt-modified Insert clipboard chords · pingdotgg/t3code@4a8d326
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/web/src/components/ThreadTerminalDrawer.test.ts +8Lines changed: 8 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -39,6 +39,14 @@ describe("terminal selection actions", () => { | 39 | 39 | action("terminal.paste", key("v", { ctrlKey: true, shiftKey: true, altKey: true }), false), | 40 | 40 | ).toBe("paste"); | 41 | 41 | expect(action("terminal.paste", key("v", { metaKey: true }), false)).toBe("paste"); | | 42 | + const insert = (modifiers: Partial<KeyboardEvent>) => ({ | | 43 | + ...key("Insert", modifiers), | | 44 | + code: "Insert", | | 45 | + }); | | 46 | + expect(action("terminal.copy", insert({ ctrlKey: true }), true)).toBe("native"); | | 47 | + expect(action("terminal.copy", insert({ ctrlKey: true, altKey: true }), true)).toBe("copy"); | | 48 | + expect(action("terminal.paste", insert({ shiftKey: true }), false)).toBe("native"); | | 49 | + expect(action("terminal.paste", insert({ shiftKey: true, altKey: true }), false)).toBe("paste"); | 42 | 50 | expect(action("terminal.new", key("c", { ctrlKey: true }), true)).toBeNull(); | 43 | 51 | vi.unstubAllGlobals(); | 44 | 52 | }); | |
|