mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
feat: Dynamic imports for the Icons component (#14318)
* Add aria-label and twotone * Enhance LazyIcon * Fix tests and solve ject warnings * Add new line * Revert package-lock to master * Fix failing test * Implement icon overrides * Fix failing storybook * Clean up * Improve var name
This commit is contained in:
@@ -31,6 +31,7 @@ import {
|
||||
import { sliceId } from 'spec/fixtures/mockChartQueries';
|
||||
import { dashboardFilters } from 'spec/fixtures/mockDashboardFilters';
|
||||
import { dashboardWithFilter } from 'spec/fixtures/mockDashboardLayout';
|
||||
import Icons from 'src/components/Icons';
|
||||
import { FeatureFlag } from 'src/featureFlags';
|
||||
|
||||
describe('FiltersBadge', () => {
|
||||
@@ -129,7 +130,7 @@ describe('FiltersBadge', () => {
|
||||
).toHaveText('1');
|
||||
// to look at the shape of the wrapper use:
|
||||
// console.log(wrapper.dive().debug())
|
||||
expect(wrapper.dive().find('Icon[name="alert-solid"]')).toExist();
|
||||
expect(wrapper.dive().find(Icons.AlertSolid)).toExist();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -216,7 +217,7 @@ describe('FiltersBadge', () => {
|
||||
expect(
|
||||
wrapper.dive().find('[data-test="incompatible-filter-count"]'),
|
||||
).toHaveText('1');
|
||||
expect(wrapper.dive().find('Icon[name="alert-solid"]')).toExist();
|
||||
expect(wrapper.dive().find(Icons.AlertSolid)).toExist();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user