Skip to content

Commit 02bd290

Browse files
authored
refactor(charts): use vite alias paths in stories and tests (#8508)
1 parent d317ba6 commit 02bd290

23 files changed

Lines changed: 30 additions & 45 deletions

packages/charts/src/components/BarChart/BarChart.cy.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import { complexDataSet } from '../../resources/DemoProps.js';
2+
import { BarChart } from './index.js';
13
import {
24
cypressPassThroughTestsFactory,
35
testChartLegendConfig,
46
testChartZoomingTool,
57
testStackAggregateTotals,
6-
} from '../../../../../cypress/support/utils';
7-
import { complexDataSet } from '../../resources/DemoProps.js';
8-
import { BarChart } from './index.js';
8+
} from '@/cypress/support/utils';
99

1010
const dimensions = [
1111
{

packages/charts/src/components/BarChart/BarChart.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ControlsWithNote, DocsHeader, Footer } from '../../../../../.storybook/components';
1+
import { ControlsWithNote, DocsHeader, Footer } from '@sb/components';
22
import { Canvas, Meta } from '@storybook/addon-docs/blocks';
33
import TooltipStory from '../../resources/TooltipConfig.mdx';
44
import LegendStory from '../../resources/LegendConfig.mdx';

packages/charts/src/components/BulletChart/BulletChart.cy.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import {
2-
cypressPassThroughTestsFactory,
3-
testChartLegendConfig,
4-
testChartZoomingTool,
5-
} from '../../../../../cypress/support/utils';
61
import { complexDataSet } from '../../resources/DemoProps.js';
72
import { BulletChart } from './index.js';
3+
import { cypressPassThroughTestsFactory, testChartLegendConfig, testChartZoomingTool } from '@/cypress/support/utils';
84

95
const dimensions = [
106
{

packages/charts/src/components/BulletChart/BulletChart.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ControlsWithNote, DocsHeader, Footer } from '../../../../../.storybook/components';
1+
import { ControlsWithNote, DocsHeader, Footer } from '@sb/components';
22
import { Canvas, Meta } from '@storybook/addon-docs/blocks';
33
import TooltipStory from '../../resources/TooltipConfig.mdx';
44
import LegendStory from '../../resources/LegendConfig.mdx';

packages/charts/src/components/ColumnChart/ColumnChart.cy.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import { complexDataSet } from '../../resources/DemoProps.js';
2+
import { ColumnChart } from './index.js';
13
import {
24
cypressPassThroughTestsFactory,
35
testChartLegendConfig,
46
testChartZoomingTool,
57
testStackAggregateTotals,
6-
} from '../../../../../cypress/support/utils';
7-
import { complexDataSet } from '../../resources/DemoProps.js';
8-
import { ColumnChart } from './index.js';
8+
} from '@/cypress/support/utils';
99

1010
const dimensions = [
1111
{

packages/charts/src/components/ColumnChart/ColumnChart.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ControlsWithNote, DocsHeader, Footer } from '../../../../../.storybook/components';
1+
import { ControlsWithNote, DocsHeader, Footer } from '@sb/components';
22
import { Canvas, Meta } from '@storybook/addon-docs/blocks';
33
import TooltipStory from '../../resources/TooltipConfig.mdx';
44
import LegendStory from '../../resources/LegendConfig.mdx';

packages/charts/src/components/ColumnChartWithTrend/ColumnChartWithTrend.cy.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import {
2-
cypressPassThroughTestsFactory,
3-
testChartLegendConfig,
4-
testChartZoomingTool,
5-
} from '../../../../../cypress/support/utils';
61
import { complexDataSet } from '../../resources/DemoProps.js';
72
import { ColumnChartWithTrend } from './index.js';
3+
import { cypressPassThroughTestsFactory, testChartLegendConfig, testChartZoomingTool } from '@/cypress/support/utils';
84

95
const dimensions = [
106
{

packages/charts/src/components/ColumnChartWithTrend/ColumnChartWithTrend.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ControlsWithNote, DocsHeader, Footer } from '../../../../../.storybook/components';
1+
import { ControlsWithNote, DocsHeader, Footer } from '@sb/components';
22
import { Canvas, Meta } from '@storybook/addon-docs/blocks';
33
import * as ComponentStories from './ColumnChartWithTrend.stories';
44
import LegendStory from '../../resources/LegendConfig.mdx';

packages/charts/src/components/ComposedChart/ComposedChart.cy.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import { complexDataSet } from '../../resources/DemoProps.js';
2+
import { ComposedChart } from './index.js';
13
import {
24
cypressPassThroughTestsFactory,
35
testChartLegendConfig,
46
testChartZoomingTool,
57
testStackAggregateTotals,
6-
} from '../../../../../cypress/support/utils';
7-
import { complexDataSet } from '../../resources/DemoProps.js';
8-
import { ComposedChart } from './index.js';
8+
} from '@/cypress/support/utils';
99

1010
const dimensions = [
1111
{

packages/charts/src/components/ComposedChart/ComposedChart.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ControlsWithNote, DocsHeader, Footer } from '../../../../../.storybook/components';
1+
import { ControlsWithNote, DocsHeader, Footer } from '@sb/components';
22
import { Canvas, Meta } from '@storybook/addon-docs/blocks';
33
import TooltipStory from '../../resources/TooltipConfig.mdx';
44
import LegendStory from '../../resources/LegendConfig.mdx';

0 commit comments

Comments
 (0)