michael-s-molina commented on code in PR #19598:
URL: https://github.com/apache/superset/pull/19598#discussion_r851459947
##########
superset-frontend/src/components/DatabaseSelector/DatabaseSelector.test.tsx:
##########
@@ -224,6 +219,29 @@ test('Should database select display options', async () =>
{
expect(await screen.findByText('test-mysql')).toBeInTheDocument();
});
+test('should show empty state if there are no options', async () => {
+ SupersetClientGet.mockImplementation(
+ async () => ({ json: { result: [] } } as any),
+ );
+ const props = createProps();
+ render(
+ <DatabaseSelector
+ {...props}
+ db={undefined}
+ emptyState={<EmptyStateSmall title="empty" image="" />}
+ />,
+ { useRedux: true },
+ );
+ const select = screen.getByRole('combobox', {
+ name: 'Select database or type database name',
+ });
+ userEvent.click(select);
+ // const emptystate = getByAltText('empty');
Review Comment:
```suggestion
```
--
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]