The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(probe): add test for probe component rendering
Steven Enamakelfdfe588643f7
diff --git a/app/src/__probe__/probe.test.tsx b/app/src/__probe__/probe.test.tsxnew file mode 100644index 0000000000..af5c840f58--- /dev/null+++ b/app/src/__probe__/probe.test.tsx@@ -0,0 +1,32 @@+import { render, screen } from '@testing-library/react';+import userEvent from '@testing-library/user-event';+import { describe, expect, it, vi } from 'vitest';+import FeedbackFilterSelect from '../../src/components/feedback/FeedbackFilterSelect';++const OPTIONS = [+ { value: 'all', label: 'All' },+ { value: 'bug', label: 'Bug' },+ { value: 'idea', label: 'Idea' },+];++describe('probe: radix select traversal via userEvent', () => {+ it('moves the highlight with ArrowDown and commits with Enter', async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(<FeedbackFilterSelect value="all" options={OPTIONS} onChange={onChange} ariaLabel="Type" />);+ await user.click(screen.getByRole('combobox', { name: 'Type' }));+ await user.keyboard('{ArrowDown}');+ await user.keyboard('{Enter}');+ expect(onChange).toHaveBeenCalledWith('bug');+ });++ it('End jumps to the last option', async () => {+ const user = userEvent.setup();+ const onChange = vi.fn();+ render(<FeedbackFilterSelect value="all" options={OPTIONS} onChange={onChange} ariaLabel="Type" />);+ await user.click(screen.getByRole('combobox', { name: 'Type' }));+ await user.keyboard('{End}');+ await user.keyboard('{Enter}');+ expect(onChange).toHaveBeenCalledWith('idea');+ });+});