mirror of
https://github.com/apache/superset.git
synced 2026-04-20 16:44:46 +00:00
refactor: Split SliceHeaderControls into smaller files (#31270)
This commit is contained in:
committed by
GitHub
parent
25f4226dbb
commit
1d44662b1d
@@ -23,10 +23,9 @@ import { render, screen } from 'spec/helpers/testing-library';
|
||||
import { FeatureFlag, VizType } from '@superset-ui/core';
|
||||
import mockState from 'spec/fixtures/mockState';
|
||||
import { Menu } from 'src/components/Menu';
|
||||
import SliceHeaderControls, {
|
||||
SliceHeaderControlsProps,
|
||||
handleDropdownNavigation,
|
||||
} from '.';
|
||||
import SliceHeaderControls from '.';
|
||||
import { SliceHeaderControlsProps } from './types';
|
||||
import { handleDropdownNavigation } from './utils';
|
||||
|
||||
jest.mock('src/components/Dropdown', () => {
|
||||
const original = jest.requireActual('src/components/Dropdown');
|
||||
@@ -310,13 +309,13 @@ test('Should show "Drill to detail" with `can_explore` & `can_samples` perms', (
|
||||
(global as any).featureFlags = {
|
||||
[FeatureFlag.DrillToDetail]: true,
|
||||
};
|
||||
const props = {
|
||||
...createProps(),
|
||||
supersetCanExplore: true,
|
||||
};
|
||||
const props = createProps();
|
||||
props.slice.slice_id = 18;
|
||||
renderWrapper(props, {
|
||||
Admin: [['can_samples', 'Datasource']],
|
||||
Admin: [
|
||||
['can_samples', 'Datasource'],
|
||||
['can_explore', 'Superset'],
|
||||
],
|
||||
});
|
||||
expect(screen.getByText('Drill to detail')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user