diff --git a/superset-frontend/src/components/Select/AsyncSelect.test.tsx b/superset-frontend/src/components/Select/AsyncSelect.test.tsx index c1442a6b70a1c..0bb24b474a0cc 100644 --- a/superset-frontend/src/components/Select/AsyncSelect.test.tsx +++ b/superset-frontend/src/components/Select/AsyncSelect.test.tsx @@ -868,6 +868,20 @@ test('fires onChange when clearing the selection in multiple mode', async () => expect(onChange).toHaveBeenCalledTimes(1); }); +test('fires onChange when pasting a selection', async () => { + const onChange = jest.fn(); + render(); + await open(); + const input = getElementByClassName('.ant-select-selection-search-input'); + const paste = createEvent.paste(input, { + clipboardData: { + getData: () => OPTIONS[0].label, + }, + }); + fireEvent(input, paste); + expect(onChange).toHaveBeenCalledTimes(1); +}); + test('does not duplicate options when using numeric values', async () => { render( expect(onChange).toHaveBeenCalledTimes(1); }); +test('fires onChange when pasting a selection', async () => { + const onChange = jest.fn(); + render(