EnxDev commented on code in PR #35916:
URL: https://github.com/apache/superset/pull/35916#discussion_r2493989970
##########
superset-frontend/src/features/databases/DatabaseModal/index.test.tsx:
##########
@@ -423,6 +424,45 @@ describe('DatabaseModal', () => {
expect(footer).toBeEmptyDOMElement();
});
+ test('shows filtered database options when pasting text in the select',
async () => {
+ setup();
+
+ const modal = await screen.findByRole('dialog');
+ expect(modal).toBeInTheDocument();
+
+ // Find the select input (not opening the dropdown)
+ const selectInput = screen.getByRole('combobox');
+
+ // Simulate focusing the input
+ userEvent.click(selectInput);
+
+ // Simulate a paste event with clipboard data
+ fireEvent.paste(selectInput, {
+ clipboardData: {
+ getData: () => 'post',
+ },
+ });
+
+ fireEvent.change(selectInput, { target: { value: 'post' } });
Review Comment:
I simplified the test, when text is pasted into the select, it verifies that
no exceptions are thrown
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]