mirror of
https://github.com/apache/superset.git
synced 2026-04-17 23:25:05 +00:00
refactor: icon to icons in DatasourceEditor (#15240)
* intial commit * lint * fix test * fix lint * remove console. * Removing pixel placement override. Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
committed by
GitHub
parent
58cc78d2c1
commit
c211f7df8e
@@ -27,6 +27,7 @@ import { render, screen } from 'spec/helpers/testing-library';
|
||||
import { Radio } from 'src/components/Radio';
|
||||
|
||||
import Icon from 'src/components/Icon';
|
||||
import Icons from 'src/components/Icons';
|
||||
import Tabs from 'src/components/Tabs';
|
||||
import DatasourceEditor from 'src/datasource/DatasourceEditor';
|
||||
import Field from 'src/CRUD/Field';
|
||||
@@ -174,8 +175,8 @@ describe('DatasourceEditor', () => {
|
||||
const sourceTab = wrapper.find(Tabs.TabPane).first();
|
||||
expect(sourceTab.find(Radio).first().prop('disabled')).toBe(false);
|
||||
|
||||
const icon = sourceTab.find(Icon);
|
||||
expect(icon.prop('name')).toBe('lock-unlocked');
|
||||
const icon = wrapper.find(Icons.LockUnlocked);
|
||||
expect(icon).toExist();
|
||||
|
||||
const tableSelector = sourceTab.find(Field).shallow().find(TableSelector);
|
||||
expect(tableSelector.length).toBe(1);
|
||||
@@ -187,8 +188,8 @@ describe('DatasourceEditor', () => {
|
||||
expect(sourceTab.find(Radio).length).toBe(2);
|
||||
expect(sourceTab.find(Radio).first().prop('disabled')).toBe(true);
|
||||
|
||||
const icon = sourceTab.find(Icon);
|
||||
expect(icon.prop('name')).toBe('lock-locked');
|
||||
const icon = wrapper.find(Icons.LockLocked);
|
||||
expect(icon).toExist();
|
||||
icon.parent().simulate('click');
|
||||
expect(wrapper.state('isEditMode')).toBe(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user