Skip to content

Commit

Permalink
test: disable Chromatic for VerifyCORS (apache#864)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmud authored and zhaoyongjie committed Nov 25, 2021
1 parent 95d7644 commit 7a18783
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ export default function createQueryStory({
};
}) {
const keys = Object.keys(choices);

return () => {
const story = () => {
const host = text('Set Superset App host for CORS request', 'localhost:8088');
const mode = select('Choose mode:', keys, keys[0]);
const { formData: presetFormData, chartType } = choices[mode];
Expand Down Expand Up @@ -70,4 +69,8 @@ export default function createQueryStory({
</div>
);
};
story.parameters = {
chromatic: { disable: true },
};
return story;
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { SuperChart } from '@superset-ui/core';
import {
maps,
ChoroplethMapChartPlugin,
} from '../../../../../../plugins/plugin-chart-choropleth-map/src';
import { withKnobs, select } from '@storybook/addon-knobs';
import { maps, ChoroplethMapChartPlugin } from '@superset-ui/plugin-chart-choropleth-map';
import useFakeMapData from './useFakeMapData';

new ChoroplethMapChartPlugin().configure({ key: 'choropleth-map' }).register();
Expand All @@ -14,7 +11,7 @@ export default {
decorators: [withKnobs],
};

export const worldMap = () => {
export const WorldMap = () => {
const map = select(
'Map',
maps.map(m => m.key),
Expand Down Expand Up @@ -48,7 +45,7 @@ export const worldMap = () => {
);
};

export const usa = () => (
export const USA = () => (
<SuperChart
chartType="choropleth-map"
width={800}
Expand Down Expand Up @@ -80,7 +77,7 @@ export const usa = () => (
/>
);

export const categoricalColor = () => (
export const CategoricalColor = () => (
<SuperChart
chartType="choropleth-map"
width={800}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@
"__timestamp": "1971-01-01T00:00:00",
"state": "other",
"gender": "boy",
"name": "<img title=\"This is an image\" src=\"https://superset.incubator.apache.org/_images/s.png\" width=\"60\" />",
"name": "<img title=\"This is an image\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==\" width=\"60\" />",
"total": 34443,
"boys": 34443,
"SUM(num_california)": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ export const configureCORS = () => {
</div>
);
};

configureCORS.parameters = {
chromatic: { disable: true },
};

0 comments on commit 7a18783

Please sign in to comment.