chore: Drill to detail Modal tests (#21148)

* Add DrillDetailModal test

* Add DrillDetailPane tests

* Add TableControls test

* Lint

* Enhance SliceHeaderControls tests

* Update superset-frontend/src/dashboard/components/DrillDetailPane/TableControls.test.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/dashboard/components/DrillDetailPane/TableControls.test.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/dashboard/components/DrillDetailPane/TableControls.test.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/dashboard/components/DrillDetailPane/TableControls.test.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/dashboard/components/DrillDetailPane/TableControls.test.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
This commit is contained in:
Geido
2022-08-29 14:22:15 +03:00
committed by GitHub
parent 77f54585de
commit 1d3a805a61
6 changed files with 369 additions and 0 deletions

View File

@@ -236,3 +236,23 @@ test('Should "Enter fullscreen"', () => {
userEvent.click(screen.getByText('Enter fullscreen'));
expect(props.handleToggleFullSize).toBeCalledTimes(1);
});
test('Drill to detail modal is under featureflag', () => {
// @ts-ignore
global.featureFlags = {
[FeatureFlag.DRILL_TO_DETAIL]: false,
};
const props = createProps();
renderWrapper(props);
expect(screen.queryByText('Drill to detail')).not.toBeInTheDocument();
});
test('Should show the "Drill to detail"', () => {
// @ts-ignore
global.featureFlags = {
[FeatureFlag.DRILL_TO_DETAIL]: true,
};
const props = createProps();
renderWrapper(props);
expect(screen.getByText('Drill to detail')).toBeInTheDocument();
});