diff --git a/src/renderer/src/components/native-chat/NativeChatJumpToLatest.test.tsx b/src/renderer/src/components/native-chat/NativeChatJumpToLatest.test.tsx new file mode 100644 index 00000000000..a7d12b2b2d3 --- /dev/null +++ b/src/renderer/src/components/native-chat/NativeChatJumpToLatest.test.tsx @@ -0,0 +1,39 @@ +// @vitest-environment happy-dom + +import '@testing-library/jest-dom/vitest' + +import { cleanup, render, screen } from '@testing-library/react' +import userEvent from '@testing-library/user-event' +import { afterEach, expect, it, vi } from 'vitest' +import { NativeChatJumpToLatest } from './NativeChatJumpToLatest' + +afterEach(cleanup) + +// The reader is usually mid-draft when they reach for this: a press must not take the caret. +it('leaves focus in the composer when pressed with the pointer', async () => { + const onJump = vi.fn() + render( + <> + +