chore: Removes duplicated featureFlags.ts (#24935)

This commit is contained in:
Michael S. Molina
2023-08-10 10:55:44 -03:00
committed by GitHub
parent 764f0f79ca
commit 284c12697b
71 changed files with 224 additions and 202 deletions

View File

@@ -20,7 +20,7 @@ import React from 'react';
import configureStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import fetchMock from 'fetch-mock';
import * as featureFlags from 'src/featureFlags';
import * as uiCore from '@superset-ui/core';
import { Provider } from 'react-redux';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import { render, screen, act } from '@testing-library/react';
@@ -108,7 +108,7 @@ describe('ShareSqlLabQuery', () => {
describe('via /kv/store', () => {
beforeAll(() => {
isFeatureEnabledMock = jest
.spyOn(featureFlags, 'isFeatureEnabled')
.spyOn(uiCore, 'isFeatureEnabled')
.mockImplementation(() => true);
});
@@ -150,7 +150,7 @@ describe('ShareSqlLabQuery', () => {
describe('via saved query', () => {
beforeAll(() => {
isFeatureEnabledMock = jest
.spyOn(featureFlags, 'isFeatureEnabled')
.spyOn(uiCore, 'isFeatureEnabled')
.mockImplementation(() => false);
});

View File

@@ -17,14 +17,19 @@
* under the License.
*/
import React from 'react';
import { FeatureFlag, styled, t, useTheme } from '@superset-ui/core';
import {
FeatureFlag,
styled,
t,
useTheme,
isFeatureEnabled,
} from '@superset-ui/core';
import Button from 'src/components/Button';
import Icons from 'src/components/Icons';
import withToasts from 'src/components/MessageToasts/withToasts';
import CopyToClipboard from 'src/components/CopyToClipboard';
import { storeQuery } from 'src/utils/common';
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
import { isFeatureEnabled } from 'src/featureFlags';
import useQueryEditor from 'src/SqlLab/hooks/useQueryEditor';
interface ShareSqlLabQueryProps {