UNPKG

@wix/design-system

Version:

@wix/design-system

77 lines 1.83 kB
import _extends from "@babel/runtime/helpers/extends"; var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/esm/SparklineChart/test/SparklineChart.visual.jsx", _this = this; import React from 'react'; import { visualize, story, snap } from 'storybook-snapper'; import SparklineChart from '../SparklineChart'; var commonProps = { data: [{ label: new Date('Thu Sep 4 2020'), value: 3 }, { label: new Date('Thu Sep 5 2020'), value: 17 }, { label: new Date('Thu Sep 6 2020'), value: 18 }, { label: new Date('Thu Sep 7 2020'), value: 12 }, { label: new Date('Thu Sep 8 2020'), value: 8 }, { label: new Date('Thu Sep 9 2020'), value: 7 }, { label: new Date('Thu Sep 10 2020'), value: 9 }] }; var tests = [{ describe: 'sanity', its: [{ it: 'default', props: {} }, { it: 'custom color', props: { color: '#d63429' } }, { it: 'partial highlighted area', props: { highlightedStartingIndex: 2, highlightedEndingIndex: 4 } }, { it: 'custom sizes', props: { width: 400, height: 80 } }] }]; visualize(SparklineChart.displayName, function () { tests.forEach(function (_ref) { var describe = _ref.describe, its = _ref.its; story(describe, function () { its.map(function (_ref2) { var it = _ref2.it, props = _ref2.props; return snap(it, function () { return /*#__PURE__*/React.createElement(SparklineChart, _extends({}, commonProps, props, { animationDuration: 0, __self: _this, __source: { fileName: _jsxFileName, lineNumber: 54, columnNumber: 11 } })); }); }); }); }); });