mirror of
https://github.com/apache/superset.git
synced 2026-04-07 18:35:15 +00:00
fix(native-filters): Fix indicators (#14334)
* fix:fix get permission function * fix: hide featured filters * test: fix FF in tests * test: fix FF in tests * fix: fix unset cross filters
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 { FeatureFlag } from 'src/featureFlags';
|
||||
|
||||
describe('FiltersBadge', () => {
|
||||
// there's this bizarre "active filters" thing
|
||||
@@ -158,6 +159,10 @@ describe('FiltersBadge', () => {
|
||||
});
|
||||
|
||||
it('shows the indicator when filters have been applied', () => {
|
||||
// @ts-ignore
|
||||
global.featureFlags = {
|
||||
[FeatureFlag.DASHBOARD_NATIVE_FILTERS]: true,
|
||||
};
|
||||
const store = getMockStoreWithNativeFilters();
|
||||
// start with basic dashboard state, dispatch an event to simulate query completion
|
||||
store.dispatch({
|
||||
@@ -182,6 +187,10 @@ describe('FiltersBadge', () => {
|
||||
});
|
||||
|
||||
it("shows a warning when there's a rejected filter", () => {
|
||||
// @ts-ignore
|
||||
global.featureFlags = {
|
||||
[FeatureFlag.DASHBOARD_NATIVE_FILTERS]: true,
|
||||
};
|
||||
const store = getMockStoreWithNativeFilters();
|
||||
// start with basic dashboard state, dispatch an event to simulate query completion
|
||||
store.dispatch({
|
||||
|
||||
Reference in New Issue
Block a user