diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.test.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.test.tsx
index 2b064f6c10..5d58060155 100644
--- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.test.tsx
+++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.test.tsx
@@ -43,6 +43,25 @@ jest.mock('@superset-ui/core', () => ({
isFeatureEnabled: () => true,
}));
+jest.mock('src/components/Icons/Icon', () => ({
+ __esModule: true,
+ default: ({
+ fileName,
+ role,
+ ...rest
+ }: {
+ fileName: string;
+ role: string;
+ }) => (
+
+ ),
+ StyledIcon: () => ,
+}));
+
const dbProps = {
show: true,
database_name: 'my database',
@@ -354,11 +373,6 @@ describe('DatabaseModal', () => {
const preferredDbTextSQLite = within(preferredDbButtonSQLite).getByText(
/sqlite/i,
);
- // All dbs render with this icon in this testing environment,
- // The Icon count should equal the count of databases rendered
- const preferredDbIcon = screen.getAllByRole('img', {
- name: /default-icon/i,
- });
// renderAvailableSelector() =>