Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
Always import src files in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmud committed Aug 10, 2020
1 parent bfc7266 commit b93631b
Show file tree
Hide file tree
Showing 19 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { mount, shallow } from 'enzyme';
jest.mock('resize-observer-polyfill');
// @ts-ignore
import { triggerResizeObserver } from 'resize-observer-polyfill';
import { promiseTimeout } from '@superset-ui/core';
import { promiseTimeout } from '@superset-ui/core/src';
import { WithLegend } from '../../src';

let renderChart = jest.fn();
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ requests from domains outside your `Apache Superset` instance:
configuration in the `@superset-ui` storybook.

```javascript
import { SupersetClient } from '@superset-ui/core';
import { SupersetClient } from '@superset-ui/core/src';

SupersetClient.configure({
credentials: 'include',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
SupersetClient,
buildQueryContext,
QueryFormData,
} from '@superset-ui/core';
} from '@superset-ui/core/src';
import {
ChartClient,
getChartBuildQueryRegistry,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable max-classes-per-file */
import React from 'react';
import { QueryFormData } from '@superset-ui/core';
import { QueryFormData } from '@superset-ui/core/src';
import { ChartMetadata, ChartPlugin } from '../../src';

const DIMENSION_STYLE = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jest.mock('resize-observer-polyfill');
// @ts-ignore
import { triggerResizeObserver } from 'resize-observer-polyfill';
import ErrorBoundary from 'react-error-boundary';
import { promiseTimeout } from '@superset-ui/core';
import { promiseTimeout } from '@superset-ui/core/src';
import { SuperChart } from '../../src';
import RealSuperChart, { WrapperProps } from '../../src/components/SuperChart';
import { ChartKeys, DiligentChartPlugin, BuggyChartPlugin } from './MockChartPlugins';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { mount, shallow } from 'enzyme';
import { promiseTimeout } from '@superset-ui/core';
import { promiseTimeout } from '@superset-ui/core/src';
import mockConsole, { RestoreConsole } from 'jest-mock-console';

import { ChartProps } from '../../src';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { QueryFormData, DatasourceType } from '@superset-ui/core';
import { QueryFormData, DatasourceType } from '@superset-ui/core/src';
import {
ChartPlugin,
ChartMetadata,
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Description
#### Example usage

```js
import { xxx } from '@superset-ui/core';
import { xxx } from '@superset-ui/core/src';
```

#### API
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-demo/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { jsxDecorator } from 'storybook-addon-jsx';
import categoricalD3 from '@superset-ui/color/esm/colorSchemes/categorical/d3';
import sequentialCommon from '@superset-ui/color/esm/colorSchemes/sequential/common';
import sequentialD3 from '@superset-ui/color/esm/colorSchemes/sequential/d3';
import { configure } from '@superset-ui/core';
import { configure } from '@superset-ui/core/src';
import { getCategoricalSchemeRegistry, getSequentialSchemeRegistry } from '@superset-ui/color';
import { getTimeFormatterRegistry, smartDateFormatter } from '@superset-ui/time-format';
import themeDecorator from "./themeDecorator"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ReactNode } from 'react';
import { SupersetClient, Method } from '@superset-ui/core';
import { makeApi, SupersetApiError } from '@superset-ui/core';
import { SupersetClient, Method } from '@superset-ui/core/src';
import { makeApi, SupersetApiError } from '@superset-ui/core/src';
import ErrorMessage from './ErrorMessage';

export type Props = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { text, select } from '@storybook/addon-knobs';
import { SuperChart, ChartDataProvider } from '@superset-ui/chart';
import { SupersetClient } from '@superset-ui/core';
import { SupersetClient } from '@superset-ui/core/src';
import Expandable from './Expandable';
import VerifyCORS, { renderError } from './VerifyCORS';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { text, select, withKnobs } from '@storybook/addon-knobs';

import { SuperChart, ChartDataProvider } from '@superset-ui/chart';
import { SupersetClient } from '@superset-ui/core';
import { SupersetClient } from '@superset-ui/core/src';
import { BigNumberChartPlugin as LegacyBigNumberPlugin } from '@superset-ui/legacy-preset-chart-big-number';
import LegacySankeyPlugin from '@superset-ui/legacy-plugin-chart-sankey';
import LegacySunburstPlugin from '@superset-ui/legacy-plugin-chart-sunburst';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { promiseTimeout } from '@superset-ui/core';
import { promiseTimeout } from '@superset-ui/core/src';
import { getMultipleTextDimensions } from '../src';
import { addDummyFill, removeDummyFill, SAMPLE_TEXT } from './getBBoxDummyFill';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { promiseTimeout } from '@superset-ui/core';
import { promiseTimeout } from '@superset-ui/core/src';
import { getTextDimension } from '../src';
import { addDummyFill, removeDummyFill, SAMPLE_TEXT } from './getBBoxDummyFill';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { DatasourceType } from '@superset-ui/core';
import { DatasourceType } from '@superset-ui/core/src';
import { TimeGranularity } from '@superset-ui/time-format';
import transformProps, {
BignumberChartProps,
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-chart-table/test/testData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
import { ChartProps } from '@superset-ui/chart';
import { DatasourceType } from '@superset-ui/core';
import { DatasourceType } from '@superset-ui/core/src';

const basicFormData = {
alignPn: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
import { ChartProps } from '@superset-ui/chart';
import { DatasourceType } from '@superset-ui/core';
import { DatasourceType } from '@superset-ui/core/src';
import { TableChartProps } from '../src/transformProps';

const basicFormData = {
Expand Down
2 changes: 1 addition & 1 deletion temporary-plugins/setupJest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { configure as configureTranslation } from '@superset-ui/core';
import { configure as configureTranslation } from '@superset-ui/core/src';
import { configure as configureEnzyme } from 'enzyme';
import EnzymeReactAdapter from 'enzyme-adapter-react-16';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import JSXAddon from 'storybook-addon-jsx';
import categoricalD3 from '@superset-ui/color/esm/colorSchemes/categorical/d3';
import sequentialCommon from '@superset-ui/color/esm/colorSchemes/sequential/common';
import sequentialD3 from '@superset-ui/color/esm/colorSchemes/sequential/d3';
import { configure } from '@superset-ui/core';
import { configure } from '@superset-ui/core/src';
import { getCategoricalSchemeRegistry, getSequentialSchemeRegistry } from '@superset-ui/color';
import { getTimeFormatterRegistry, smartDateFormatter } from '@superset-ui/time-format';

Expand Down

0 comments on commit b93631b

Please sign in to comment.