mirror of
https://github.com/apache/superset.git
synced 2026-04-14 13:44:46 +00:00
fix: remove unused .js module (#8741)
* fix: remove unused .js module * fix tests, remove more references * lints
This commit is contained in:
committed by
GitHub
parent
b107cc03bf
commit
e127579fc8
@@ -24,14 +24,9 @@ import { defaultControls } from 'src/explore/store';
|
||||
import { getFormDataFromControls } from 'src/explore/controlUtils';
|
||||
import { ControlPanelsContainer } from 'src/explore/components/ControlPanelsContainer';
|
||||
import ControlPanelSection from 'src/explore/components/ControlPanelSection';
|
||||
import * as featureFlags from 'src/featureFlags';
|
||||
|
||||
describe('ControlPanelsContainer', () => {
|
||||
let wrapper;
|
||||
let scopedFilterOn = false;
|
||||
const isFeatureEnabledMock = jest
|
||||
.spyOn(featureFlags, 'isFeatureEnabled')
|
||||
.mockImplementation(() => scopedFilterOn);
|
||||
|
||||
beforeAll(() => {
|
||||
getChartControlPanelRegistry().registerValue('table', {
|
||||
@@ -81,7 +76,6 @@ describe('ControlPanelsContainer', () => {
|
||||
|
||||
afterAll(() => {
|
||||
getChartControlPanelRegistry().remove('table');
|
||||
isFeatureEnabledMock.mockRestore();
|
||||
});
|
||||
|
||||
function getDefaultProps() {
|
||||
@@ -100,10 +94,4 @@ describe('ControlPanelsContainer', () => {
|
||||
wrapper = shallow(<ControlPanelsContainer {...getDefaultProps()} />);
|
||||
expect(wrapper.find(ControlPanelSection)).toHaveLength(6);
|
||||
});
|
||||
|
||||
it('renders filter panel when SCOPED_FILTER flag is on', () => {
|
||||
scopedFilterOn = true;
|
||||
wrapper = shallow(<ControlPanelsContainer {...getDefaultProps()} />);
|
||||
expect(wrapper.find(ControlPanelSection)).toHaveLength(7);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user