Skip to content

Commit 1cc6349

Browse files
committed
test: modify test case
1 parent 7884696 commit 1cc6349

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/Tags.test.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,18 @@ describe('Select.Tags', () => {
149149
showSearch
150150
onSelect={handleSelect}
151151
options={[
152-
{ label: 'Dacryoadenitis', value: 'opt1' },
153-
{ label: 'Dacryocystitis', value: 'opt2' },
152+
{ label: 'opt1', value: 'opt1' },
153+
{ label: 'opt2', value: 'opt2' },
154154
]}
155155
/>,
156156
);
157-
fireEvent.change(container.querySelector('input'), { target: { value: 'da' } });
157+
fireEvent.change(container.querySelector('input'), { target: { value: 'op' } });
158158
jest.runAllTimers();
159-
fireEvent.mouseMove(container.querySelector('.rc-select-item-option'));
159+
keyDown(container.querySelector('input'), KeyCode.DOWN);
160160
keyDown(container.querySelector('input'), KeyCode.ENTER);
161161
jest.runAllTimers();
162162
expect(handleSelect).toHaveBeenCalledTimes(1);
163+
expect(handleSelect).toHaveBeenCalledWith('opt1', expect.anything());
163164
});
164165

165166
// Paste tests

0 commit comments

Comments
 (0)