fix: add modality defaults to prevent API errors when reading PDFs

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
tanzhenxin 2026-02-27 20:00:38 +08:00
parent f50a032c91
commit 66dbc50de1
18 changed files with 917 additions and 556 deletions

View file

@ -108,7 +108,7 @@ describe('<ModelDialog />', () => {
it('renders the title and help text', () => {
const { getByText } = renderComponent();
expect(getByText('Select Model')).toBeDefined();
expect(getByText('(Press Esc to close)')).toBeDefined();
expect(getByText('Enter to select · Esc to close')).toBeDefined();
});
it('passes all model options to DescriptiveRadioButtonSelect', () => {
@ -251,11 +251,12 @@ describe('<ModelDialog />', () => {
expect(props.onClose).toHaveBeenCalledTimes(1);
});
it('does not pass onHighlight to DescriptiveRadioButtonSelect', () => {
it('passes onHighlight to DescriptiveRadioButtonSelect', () => {
renderComponent();
const childOnHighlight = mockedSelect.mock.calls[0][0].onHighlight;
expect(childOnHighlight).toBeUndefined();
expect(childOnHighlight).toBeDefined();
expect(typeof childOnHighlight).toBe('function');
});
it('calls onClose prop when "escape" key is pressed', () => {